Sha256: 8ea580acb3377ff31b437adf8265fed898604b7ea9186f22fbf8923df9149188

Contents?: true

Size: 982 Bytes

Versions: 55

Compression:

Stored size: 982 Bytes

Contents

require "rails_helper"

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

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

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

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

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

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

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

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

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

  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

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