Skip to content

Commit

Permalink
Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
brianjaustin committed Jul 31, 2024
1 parent c40201a commit 763a904
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/tag_wranglers/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<p class="icon"><%= icon_display(@wrangler) %></p>
<!--/descriptions-->
<!--subnav-->
<% if policy(:tag_wrangler).report_csv? %>
<% if policy(:wrangling).report_csv? %>
<ul class="navigation actions" role="navigation">
<li><%= link_to t(".tags_wrangled_csv"), report_csv_tag_wrangler_path %></li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion features/tags_and_wrangling/tag_wrangling_admin.feature
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Feature: Tag wrangling
Scenario: Admin can remove a user's wrangling assignments

Given the tag wrangler "tangler" with password "wr@ngl3r" is wrangler of "Testing"
When I am logged in as an admin
When I am logged in as a "tag_wrangling" admin
And I am on the wranglers page
And I follow "x"
Then I should see "Wranglers were successfully unassigned!"
Expand Down
7 changes: 6 additions & 1 deletion spec/controllers/tag_wranglers_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@
end

before(:all) do
Role.find_or_create_by(name: "tag_wrangler")
Role.create!(name: "tag_wrangler")
end

after(:all) do
# Clean up when we're done, a few other specs become unhappy otherwise
Role.find_by(name: "tag_wrangler").destroy!
end

describe "#index" do
Expand Down

0 comments on commit 763a904

Please sign in to comment.