Sha256: 1b49bad5f93c450a931a1aef7da49e6cff0214a0ee6b9aedc98798d57eed5b22

Contents?: true

Size: 1.04 KB

Versions: 35

Compression:

Stored size: 1.04 KB

Contents

require "rails_helper"

RSpec.describe ::Dorsale::UsersController, type: :routing do
  describe "routing" do
    routes { ::Dorsale::Engine.routes }
    it "routes to #index" do
      expect(:get => "users").to route_to("dorsale/users#index")
    end

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

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

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

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

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

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

    it "doesn't route to #destroy" do
      expect(:delete => "users/1").not_to be_routable
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
dorsale-4.0.0 spec/routing/dorsale/users_routing_spec.rb
dorsale-3.20.0 spec/routing/dorsale/users_routing_spec.rb
dorsale-3.19.1 spec/routing/dorsale/users_routing_spec.rb
dorsale-3.19.0 spec/routing/dorsale/users_routing_spec.rb
dorsale-3.18.0 spec/routing/dorsale/users_routing_spec.rb
dorsale-3.17.0 spec/routing/dorsale/users_routing_spec.rb
dorsale-3.16.0 spec/routing/dorsale/users_routing_spec.rb
dorsale-3.15.0 spec/routing/dorsale/users_routing_spec.rb
dorsale-3.14.11 spec/routing/dorsale/users_routing_spec.rb
dorsale-3.14.10 spec/routing/dorsale/users_routing_spec.rb
dorsale-3.14.9 spec/routing/dorsale/users_routing_spec.rb
dorsale-3.14.8 spec/routing/dorsale/users_routing_spec.rb
dorsale-3.14.7 spec/routing/dorsale/users_routing_spec.rb
dorsale-3.14.6 spec/routing/dorsale/users_routing_spec.rb
dorsale-3.14.5 spec/routing/dorsale/users_routing_spec.rb
dorsale-3.14.3 spec/routing/dorsale/users_routing_spec.rb
dorsale-3.14.2 spec/routing/dorsale/users_routing_spec.rb
dorsale-3.14.1 spec/routing/dorsale/users_routing_spec.rb
dorsale-3.14.0 spec/routing/dorsale/users_routing_spec.rb
dorsale-3.13.0 spec/routing/dorsale/users_routing_spec.rb