require "rails_helper"

RSpec.describe MetapursesController, type: :routing do
  describe "routing" do
    it "routes to #index" do
      expect(get: "/metapurses").to route_to("metapurses#index")
    end

    it "routes to #new" do
      expect(get: "/metapurses/new").to route_to("metapurses#new")
    end

    it "routes to #show" do
      expect(get: "/metapurses/1").to route_to("metapurses#show", id: "1")
    end

    it "routes to #edit" do
      expect(get: "/metapurses/1/edit").to route_to("metapurses#edit", id: "1")
    end


    it "routes to #create" do
      expect(post: "/metapurses").to route_to("metapurses#create")
    end

    it "routes to #update via PUT" do
      expect(put: "/metapurses/1").to route_to("metapurses#update", id: "1")
    end

    it "routes to #update via PATCH" do
      expect(patch: "/metapurses/1").to route_to("metapurses#update", id: "1")
    end

    it "routes to #destroy" do
      expect(delete: "/metapurses/1").to route_to("metapurses#destroy", id: "1")
    end
  end
end
