-
Notifications
You must be signed in to change notification settings - Fork 422
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added link to hide topics on topics/show for admins. Also fix bug whe…
…re hidden topics weren't actually hidden
- Loading branch information
Showing
6 changed files
with
53 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
require 'spec_helper' | ||
|
||
describe "topics" do | ||
let(:forum) { Factory(:forum) } | ||
let(:topic) { Factory(:topic, :forum => forum) } | ||
|
||
before do | ||
sign_in! :admin => true | ||
end | ||
|
||
it "can hide a topic" do | ||
visit forum_topic_path(forum, topic) | ||
click_link "Hide" | ||
page! | ||
flash_notice!("This topic is now hidden.") | ||
|
||
sign_out! | ||
|
||
visit forum_topic_path(forum, topic) | ||
flash_error!("The topic you are looking for could not be found.") | ||
end | ||
end |