Skip to content

Commit

Permalink
replies dont work when you're logged out
Browse files Browse the repository at this point in the history
  • Loading branch information
steveklabnik committed Nov 25, 2010
1 parent cea51ec commit 967c48f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
5 changes: 0 additions & 5 deletions features/forum.feature
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
Feature: The Hackety Forum
Scenario: Can't make discussions when logged out
Given I'm not logged in
And I go to the forums
When I follow "Learning Ruby"
Then I should not see "New Discussion"
Scenario: Can't make replies when logged out
Given I'm not logged in
And there's a discussion named "I need help" in "learning_ruby" with a reply
Expand Down
15 changes: 15 additions & 0 deletions spec/acceptance/forum_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,19 @@
page.should have_content "By #{@hacker.username}"
end

scenario "Can't make discussions when logged out" do

visit "/forums"
click_link "Learning Ruby"

page.should_not have_content "New Discussion"
end

scenario "Can't make replies when logged out" do
Factory(:discussion, :title => "I need help!", :forum => "learning_ruby")

visit "/forums/learning_ruby/i_need_help"
page.should_not have_content "Reply"
end

end

0 comments on commit 967c48f

Please sign in to comment.