-
Notifications
You must be signed in to change notification settings - Fork 4
/
authenticated_votes.feature
40 lines (31 loc) · 1.22 KB
/
authenticated_votes.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Feature: Votes with authentication
In order to determine which talk to give
people need to be able to vote for the ones they like
and since we know who they are, they can take back their vote!
Background: Make sure that we have a topic
Given I go to topics
And I follow "New topic"
When I fill in "Title" with "Rails Fixtures"
And I fill in "Description" with "Introduce how to add test data with fixtures."
And I press "Create"
Scenario: viewing votes already cast
When I go to topics
Then I should see "0 votes"
Scenario: voting on a topic
When I follow "+1"
Then I should see "1 vote"
And I should see "-1"
Scenario: removing a vote on a topic
When I follow "+1"
And I follow "-1"
Then I should see "0 votes"
Scenario: seeing whether or not I have voted
When I follow "Rails Fixtures"
Then I should see "You have not voted on this talk."
Scenario: voting on a topic from the show page
When I follow "Rails Fixtures"
And I follow "I would attend a meetup on this topic"
Then I should see "You have voted for this talk"
And I should see "1 vote"
And I should see "-1"
And I should see "I'm not interested anymore"