metamaps--metamaps/spec/routing/metacodes_routing_spec.rb

30 lines
784 B
Ruby
Raw Normal View History

2015-12-16 14:19:58 +00:00
require 'rails_helper'
2015-12-16 14:19:58 +00:00
RSpec.describe MetacodesController, type: :routing do
describe 'routing' do
it 'routes to #index' do
expect(get: '/metacodes').to route_to('metacodes#index')
end
2015-12-16 14:19:58 +00:00
it 'routes to #new' do
expect(get: '/metacodes/new').to route_to('metacodes#new')
end
2015-12-16 14:19:58 +00:00
it 'routes to #edit' do
expect(get: '/metacodes/1/edit').to route_to('metacodes#edit', id: '1')
end
2015-12-16 14:19:58 +00:00
it 'routes to #create' do
expect(post: '/metacodes').to route_to('metacodes#create')
end
2015-12-16 14:19:58 +00:00
it 'routes to #update via PUT' do
expect(put: '/metacodes/1').to route_to('metacodes#update', id: '1')
end
2015-12-16 14:19:58 +00:00
# it "routes to #destroy" do
# expect(:delete => "/metacodes/1").to route_to("metacodes#destroy", :id => "1")
2015-12-16 14:19:58 +00:00
# end
end
end