Skip to content

Commit

Permalink
text/fix/adiciona expect para instancias de likes
Browse files Browse the repository at this point in the history
Co-authored-by: Paulo Henrique Meneses <[email protected]>
  • Loading branch information
DanSmaR and paulohenrique-gh committed Feb 13, 2024
1 parent 32e22ea commit 8f4aedb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/requests/likes/user_likes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
post post_likes_path(post)

expect(response).to redirect_to(new_user_session_path)
expect(Like.count).to eq 0
end

it 'e tenta descurtir uma publicação' do
Expand All @@ -16,6 +17,7 @@
delete post_like_path(like.likeable, like)

expect(response).to redirect_to(new_user_session_path)
expect(Like.count).to eq 1
end

it 'e tenta descurtir um comentário' do
Expand All @@ -24,6 +26,7 @@
delete comment_like_path(like.likeable, like)

expect(response).to redirect_to(new_user_session_path)
expect(Like.count).to eq 1
end
end

Expand All @@ -36,5 +39,6 @@

expect(response).to redirect_to(post_path(like.likeable))
expect(flash[:alert]).to eq 'Você já curtiu isso'
expect(Like.count).to eq 1
end
end

0 comments on commit 8f4aedb

Please sign in to comment.