[Rails][Rspec] Routingのテストでformatを対象にする

  • 1
    Like
  • 0
    Comment
More than 1 year has passed since last update.

メモ

require "rails_helper"

RSpec.describe Api::V2::HogeController, type: :routing do
  describe "routing" do

    it "routes to #mine" do
      expect(:get => "/api/v2/hoges/mine").to route_to("api/v2/bookmarks#mine", format: "json")
    end
.
.
.