Skip to content

Commit 967c48f

Browse files
committed
replies dont work when you're logged out
1 parent cea51ec commit 967c48f

2 files changed

Lines changed: 15 additions & 5 deletions

File tree

features/forum.feature

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
Feature: The Hackety Forum
2-
Scenario: Can't make discussions when logged out
3-
Given I'm not logged in
4-
And I go to the forums
5-
When I follow "Learning Ruby"
6-
Then I should not see "New Discussion"
72
Scenario: Can't make replies when logged out
83
Given I'm not logged in
94
And there's a discussion named "I need help" in "learning_ruby" with a reply

spec/acceptance/forum_spec.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,19 @@
6868
page.should have_content "By #{@hacker.username}"
6969
end
7070

71+
scenario "Can't make discussions when logged out" do
72+
73+
visit "/forums"
74+
click_link "Learning Ruby"
75+
76+
page.should_not have_content "New Discussion"
77+
end
78+
79+
scenario "Can't make replies when logged out" do
80+
Factory(:discussion, :title => "I need help!", :forum => "learning_ruby")
81+
82+
visit "/forums/learning_ruby/i_need_help"
83+
page.should_not have_content "Reply"
84+
end
85+
7186
end

0 commit comments

Comments
 (0)