Sha256: 561ef7a1c0767020cc52951d3b2a5a24f98833befb22481d7880205359a9e10f
Contents?: true
Size: 1.93 KB
Versions: 20
Compression:
Stored size: 1.93 KB
Contents
require "rails_helper" module CustomerVault RSpec.describe CorporationsController, :type => :routing do routes { CustomerVault::Engine.routes } describe "routing" do it "routes to #new" do expect(:get => "/corporations/new").to route_to("customer_vault/corporations#new") end it "routes to #show" do expect(:get => "/corporations/1").to route_to("customer_vault/corporations#show", :id => "1") end it "routes to #edit" do expect(:get => "/corporations/1/edit").to route_to("customer_vault/corporations#edit", :id => "1") end it "routes to #create" do expect(:post => "/corporations").to route_to("customer_vault/corporations#create") end it "routes to #update" do expect(:put => "/corporations/1").to route_to("customer_vault/corporations#update", :id => "1") end it "routes to #destroy" do expect(:delete => "/corporations/1").to route_to("customer_vault/corporations#destroy", :id => "1") end describe 'links' do it "routes to links#new" do expect(:get => "/corporations/1/links/new").to route_to("customer_vault/links#new", :corporation_id => "1") end it "routes to links#edit" do expect(:get => "/corporations/1/links/2/edit").to route_to("customer_vault/links#edit", :corporation_id => "1", :id => "2") end it "routes to links#create" do expect(:post => "/corporations/1/links").to route_to("customer_vault/links#create", :corporation_id => "1") end it "routes to links#update" do expect(:put => "/corporations/1/links/2").to route_to("customer_vault/links#update", :corporation_id => "1", :id => "2") end it "routes to links#destroy" do expect(:delete => "/corporations/1/links/2").to route_to("customer_vault/links#destroy", :corporation_id => "1", :id => "2") end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems