Files
astuto/spec/routing/boards_routing_spec.rb

31 lines
780 B
Ruby
Raw Normal View History

2019-08-24 19:48:31 +02:00
require 'rails_helper'
2019-09-04 17:37:08 +02:00
RSpec.describe 'boards routing', :aggregate_failures, type: :routing do
it 'routes boards' do
2019-08-24 19:48:31 +02:00
expect(get: '/boards/1').to route_to(
controller: 'boards', action: 'show', id: '1'
)
expect(get: '/boards').to route_to(
controller: 'boards', action: 'index'
)
2019-09-27 14:41:54 +02:00
expect(get: '/boards/new').not_to route_to(
controller: 'boards', action: 'new'
)
2019-08-24 19:48:31 +02:00
expect(get: '/boards/1/edit').not_to be_routable
expect(post: '/boards').to route_to(
controller: 'boards', action: 'create'
)
expect(patch: '/boards/1').to route_to(
controller: 'boards', action: 'update', id: '1'
)
expect(delete: '/boards/1').to route_to(
controller: 'boards', action: 'destroy', id: '1'
)
2019-08-24 19:48:31 +02:00
end
end