Skip to content

Commit

Permalink
Fix specs for translation exceptions
Browse files Browse the repository at this point in the history
Since we're now raising on missing translations, these specs
must use Transaction subclasses and `collaboration_type`s with
translations.

Transaction, as an abstract class, does not possess them, and
"Replace me" is likewise not a valid collaboration_type.
  • Loading branch information
rgarner committed Feb 5, 2025
1 parent 644587a commit 68b5e47
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spec/features/users_can_edit_an_activity_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
let(:activity) { create(:project_activity, organisation: user.organisation) }

it "saves the value and shows an update success message" do
activity.update_columns(title: nil, collaboration_type: "Replace me")
activity.update_columns(title: nil, collaboration_type: "1")
_report = create(:report, :active, organisation: user.organisation, fund: activity.associated_fund)

visit organisation_activity_details_path(activity.organisation, activity)
Expand Down
2 changes: 1 addition & 1 deletion spec/validators/date_not_in_future_validator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
validates :date, date_not_in_future: true

def self.name
"Transaction"
"Actual"
end
}.new
end
Expand Down
2 changes: 1 addition & 1 deletion spec/validators/date_within_boundaries_validator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
validates :date, date_within_boundaries: true

def self.name
"Transaction"
"Actual"
end
}.new
end
Expand Down

0 comments on commit 68b5e47

Please sign in to comment.