Browse files

Add current guild chooser to raids list page

  • Loading branch information...
1 parent 3e97ba6 commit e4b21469798c766c4ba821e00be89aa75860a81d @jasonroelofs committed Sep 18, 2012
Showing with 30 additions and 1 deletion.
  1. +1 −1 app/views/raids/index.html.erb
  2. +29 −0 features/raids/list_raids.feature
View
2 app/views/raids/index.html.erb
@@ -1,4 +1,4 @@
-<h2>Scheduled Raids</h2>
+<%= current_guild_chooser %>
<% permission :schedule_raid do %>
<%= link_to "Schedule a Raid", new_raid_path, :class => "btn btn-large btn-primary" %>
View
29 features/raids/list_raids.feature
@@ -32,3 +32,32 @@ Scenario: A raider can see raids for his guild
When I follow "Raids"
Then I should see "ICC July 1, 2012"
And I should see "Firelands July 2, 2012"
+
+Scenario: A user can see raid list for the current guild
+ Given "raider" has the following characters
+ | name | guild |
+ | Weemuu | Exiled |
+ | Panduu | MindCrush |
+ And "Exiled" has scheduled the following raids
+ | where | when | start | invite_offset |
+ | ICC | 2012/07/01 | 20:00 | 15 |
+ | Firelands | 2012/07/02 | 21:00 | 30 |
+ And "MindCrush" has scheduled the following raids
+ | where | when | start | invite_offset |
+ | Shadowpan | 2012/07/03 | 19:00 | 15 |
+ | BWL | 2012/07/04 | 19:00 | 15 |
+ And I am signed in as "raider"
+
+ When I follow "Raids"
+ Then the current guild should be "Exiled"
+ And I should see "ICC July 1, 2012"
+ And I should see "Firelands July 2, 2012"
+ And I should not see "Shadowpan July 3, 2012"
+ And I should not see "BWL July 4, 2012"
+
+ When I change the guild to "MindCrush"
+
+ Then I should not see "ICC July 1, 2012"
+ And I should not see "Firelands July 2, 2012"
+ And I should see "Shadowpan July 3, 2012"
+ And I should see "BWL July 4, 2012"

0 comments on commit e4b2146

Please sign in to comment.