Improve Post component

This commit is contained in:
riggraz
2019-09-12 18:03:19 +02:00
parent f599471af1
commit e649588211
11 changed files with 50 additions and 36 deletions

View File

@@ -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