Skip to content

Commit

Permalink
Cleaned up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danaguilar committed Jun 21, 2023
1 parent c5ea9a2 commit 962ae9b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/case_contacts/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ readonly: true %>
</div>
<% end %>
<% if policy(:case_contact).additional_expenses_allowed? %>
<% if Pundit.policy(current_user, case_contact).additional_expenses_allowed? %>
<div class="other-expenses">
<h5 class="mb-3"><%= form.label :additional_expense, "d. Other Expenses" %></h5>
<ol>
Expand Down
1 change: 1 addition & 0 deletions spec/requests/case_contacts_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@

before do
FeatureFlagService.enable!(FeatureFlagService::SHOW_ADDITIONAL_EXPENSES_FLAG)
organization.additional_expenses_enabled = true
end

it "creates an additional expense with correct values", :aggregate_failures do
Expand Down
4 changes: 2 additions & 2 deletions spec/system/case_contacts/additional_expenses_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
expect(page).not_to have_text("Other Expenses")
end

context "when setting additional expenses" do
context "when setting additional expenses" do
let(:contact_type_group) { build(:contact_type_group, casa_org: organization) }

before do
before do
create(:contact_type)
create(:contact_type, name: "School", contact_type_group: contact_type_group)
end
Expand Down

0 comments on commit 962ae9b

Please sign in to comment.