Skip to content

Commit 42b04e5

Browse files
dblockCopilot
andcommitted
Stabilize rounds relative time spec
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 470aae6 commit 42b04e5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

spec/slack-sup/commands/rounds_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@
3030

3131
it 'reports counts' do
3232
Timecop.travel(Time.now + 731.days)
33+
previous_round = team.rounds.asc(:_id).first
3334
expect(message: "#{SlackRubyBot.config.user} rounds 2").to respond_with_slack_message(
3435
"Team S'Up facilitated 2 rounds.\n" \
3536
"* in progress: 1 S'Up paired 3 users and no outcomes reported.\n" \
36-
"* 1 year ago: 1 S'Up paired 3 users, 100% positive outcomes and 100% outcomes reported."
37+
"* #{previous_round.ran_at.to_time.ago_in_words(highest_measure_only: true)}: 1 S'Up paired 3 users, 100% positive outcomes and 100% outcomes reported."
3738
)
3839
end
3940
end

0 commit comments

Comments
 (0)