mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 11:17:49 +01:00
Improve Post component
This commit is contained in:
@@ -8,10 +8,14 @@ RSpec.describe 'posts routing', :aggregate_failures, type: :routing do
|
||||
expect(post: '/posts').to route_to(
|
||||
controller: 'posts', action: 'create'
|
||||
)
|
||||
expect(get: '/posts/1').to route_to(
|
||||
controller: 'posts', action: 'show', id: '1'
|
||||
)
|
||||
expect(patch: '/posts/1').to route_to(
|
||||
controller: 'posts', action: 'update', id: '1'
|
||||
)
|
||||
|
||||
expect(get: '/posts/1').not_to be_routable
|
||||
expect(get: '/posts/1/edit').not_to be_routable
|
||||
expect(patch: '/posts/1').not_to be_routable
|
||||
expect(delete: '/posts/1').not_to be_routable
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user