metamaps--metamaps/spec/routing/mappings_routing_spec.rb

22 lines
557 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 MappingsController, type: :routing do
describe 'routing' do
it 'routes to #show' do
expect(get: '/mappings/1').to route_to('mappings#show', id: '1')
end
2015-12-16 14:19:58 +00:00
it 'routes to #create' do
expect(post: '/mappings').to route_to('mappings#create')
end
2015-12-16 14:19:58 +00:00
it 'routes to #update via PUT' do
expect(put: '/mappings/1').to route_to('mappings#update', id: '1')
end
2015-12-16 14:19:58 +00:00
it 'routes to #destroy' do
expect(delete: '/mappings/1').to route_to('mappings#destroy', id: '1')
end
end
end