Skip to content

Commit

Permalink
Added new line before title in monthly digest (thewca#9653)
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljames-dj authored Jul 15, 2024
1 parent 831efda commit 46ca1ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/models/user_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def changes_in_group_for_digest

changes_of_last_month = []
if leader_appointments.count + no_more_leaders.count + promoted_senior_members.count + new_senior_members.count + new_members.count + demoted_senior_members.count + no_more_senior_members.count + no_more_members.count > 0
changes_of_last_month.push("<b>Changes in #{self.name}</b>")
changes_of_last_month.push("<br><b>Changes in #{self.name}</b>")
if leader_appointments.count + no_more_leaders.count > 0
changes_of_last_month.push("<br><b>Leaders</b>")
if leader_appointments.count > 0
Expand Down
6 changes: 3 additions & 3 deletions spec/models/user_group_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
FactoryBot.create :wrc_member_role, user_id: users[7].id, start_date: Time.now - 4.days

expected_output = [
"<b>Changes in WCA Regulations Committee</b>",
"<br><b>Changes in WCA Regulations Committee</b>",
"",
"<b>New Members</b>",
*[users[6].name, users[7].name].sort,
Expand All @@ -172,7 +172,7 @@
FactoryBot.create :wrc_senior_member_role, user_id: team_member.user.id, start_date: Time.now - 5.days

expected_output = [
"<b>Changes in WCA Regulations Committee</b>",
"<br><b>Changes in WCA Regulations Committee</b>",
"",
"<b>Promoted Senior Members</b>",
team_member.user.name,
Expand All @@ -190,7 +190,7 @@
FactoryBot.create :wrc_leader_role, user_id: new_leader.user.id, start_date: Time.now - 10.days

expected_output = [
"<b>Changes in WCA Regulations Committee</b>",
"<br><b>Changes in WCA Regulations Committee</b>",
"",
"<b>Leaders</b>",
"#{new_leader.user.name} has been appointed as the new Leader.",
Expand Down

0 comments on commit 46ca1ee

Please sign in to comment.