Sha256: 6e5616def236e1a85eed8aa089b8db5757c974c6341a992fce9a33cc87f248de

Contents?: true

Size: 982 Bytes

Versions: 57

Compression:

Stored size: 982 Bytes

Contents

require "rails_helper"

RSpec.describe TestsController, type: :routing do
  describe "routing" do

    it "routes to #index" do
      expect(:get => "/tests").to route_to("tests#index")
    end

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

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

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

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

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

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

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

  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
wordjelly-auth-1.6.0 spec/dummy/spec/routing/tests_routing_spec.rb
wordjelly-auth-1.5.9 spec/dummy/spec/routing/tests_routing_spec.rb
wordjelly-auth-1.5.8 spec/dummy/spec/routing/tests_routing_spec.rb
wordjelly-auth-1.5.7 spec/dummy/spec/routing/tests_routing_spec.rb
wordjelly-auth-1.5.6 spec/dummy/spec/routing/tests_routing_spec.rb
wordjelly-auth-1.5.5 spec/dummy/spec/routing/tests_routing_spec.rb
wordjelly-auth-1.5.4 spec/dummy/spec/routing/tests_routing_spec.rb
wordjelly-auth-1.5.3 spec/dummy/spec/routing/tests_routing_spec.rb
wordjelly-auth-1.5.2 spec/dummy/spec/routing/tests_routing_spec.rb
wordjelly-auth-1.5.1 spec/dummy/spec/routing/tests_routing_spec.rb
wordjelly-auth-1.5.0 spec/dummy/spec/routing/tests_routing_spec.rb
wordjelly-auth-1.4.9 spec/dummy/spec/routing/tests_routing_spec.rb
wordjelly-auth-1.4.8 spec/dummy/spec/routing/tests_routing_spec.rb
wordjelly-auth-1.4.7 spec/dummy/spec/routing/tests_routing_spec.rb
wordjelly-auth-1.4.6 spec/dummy/spec/routing/tests_routing_spec.rb
wordjelly-auth-1.4.5 spec/dummy/spec/routing/tests_routing_spec.rb
wordjelly-auth-1.4.4 spec/dummy/spec/routing/tests_routing_spec.rb
wordjelly-auth-1.4.3 spec/dummy/spec/routing/tests_routing_spec.rb
wordjelly-auth-1.4.2 spec/dummy/spec/routing/tests_routing_spec.rb
wordjelly-auth-1.4.0 spec/dummy/spec/routing/tests_routing_spec.rb