Skip to content

Commit 63d73df

Browse files
committed
Cucumber test for liking a post in a discussion
1 parent 96f1a40 commit 63d73df

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

features/like_post.feature

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Feature: Like post
2+
In order for users to show their appreciation for other users' posts
3+
A user must be able to like a post
4+
5+
Scenario: Like post
6+
Given I am logged in
7+
And a group is created
8+
And a discussion is created
9+
And I am on the discussion page
10+
And a comment is added to the discussion
11+
When I click the like button on a post
12+
Then a post is liked
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
When /^I click the like button on a post$/ do
2+
click_link 'Like'
3+
end
4+
5+
Then /^a post is liked$/ do
6+
page.should have_content('Liked by ' + User.last.name)
7+
end

0 commit comments

Comments
 (0)