Sha256: c5f08c57da6694cc01ff2235e17707377771c35170b13c4b3e25e7b15d258975

Contents?: true

Size: 928 Bytes

Versions: 15

Compression:

Stored size: 928 Bytes

Contents

require "rails_helper"

RSpec.describe CategoriesController, :type => :routing do
  describe "routing" do

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

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

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

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

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

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

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

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
restspec-0.3.2 examples/store-api/spec/routing/categories_routing_spec.rb
restspec-0.3.1 examples/store-api/spec/routing/categories_routing_spec.rb
restspec-0.3.0 examples/store-api/spec/routing/categories_routing_spec.rb
restspec-0.2.6 examples/store-api/spec/routing/categories_routing_spec.rb
restspec-0.2.5 examples/store-api/spec/routing/categories_routing_spec.rb
restspec-0.2.4 examples/store-api/spec/routing/categories_routing_spec.rb
restspec-0.2.3 examples/store-api/spec/routing/categories_routing_spec.rb
restspec-0.2.2 examples/store-api/spec/routing/categories_routing_spec.rb
restspec-0.2.1 examples/store-api/spec/routing/categories_routing_spec.rb
restspec-0.2 examples/store-api/spec/routing/categories_routing_spec.rb
restspec-0.1 examples/store-api/spec/routing/categories_routing_spec.rb
restspec-0.0.4 examples/store-api/spec/routing/categories_routing_spec.rb
restspec-0.0.3 examples/store-api/spec/routing/categories_routing_spec.rb
restspec-0.0.2 examples/store-api/spec/routing/categories_routing_spec.rb
restspec-0.0.1 examples/store-api/spec/routing/categories_routing_spec.rb