Add button to toggle comment is post update

This commit is contained in:
riccardo
2019-10-02 16:43:13 +02:00
parent e8d7fcc359
commit 2c2a0e0c82
12 changed files with 152 additions and 9 deletions

View File

@@ -8,11 +8,13 @@ RSpec.describe 'comments routing', :aggregate_failures, type: :routing do
expect(post: '/posts/1/comments').to route_to(
controller: 'comments', action: 'create', post_id: "1"
)
expect(patch: '/posts/1/comments/1').to route_to(
controller: 'comments', action: 'update', post_id: "1", id: "1"
)
expect(get: '/posts/1/comments/1').not_to be_routable
expect(get: '/posts/1/comments/new').not_to be_routable
expect(get: '/posts/1/comments/1/edit').not_to be_routable
expect(patch: '/posts/1/comments/1').not_to be_routable
expect(delete: '/posts/1/comments/1').not_to be_routable
end
end