Sha256: 316b2cb7ee46b21f44fc34891151a48c499f3fc5f3c65815a45cd5aab4032339

Contents?: true

Size: 860 Bytes

Versions: 62

Compression:

Stored size: 860 Bytes

Contents

require 'test_helper'

module Workarea
  module Insights
    class ReleaseReminderTest < TestCase
      def test_results
        travel_to Time.zone.local(2019, 1, 6, 1)
        one = create_release(publish_at: Time.zone.local(2019, 1, 6, 2))

        travel_to Time.zone.local(2019, 1, 7, 1)
        two = create_release(publish_at: Time.zone.local(2019, 1, 7, 2))
        three = create_release(publish_at: Time.zone.local(2019, 1, 8, 2))
        four = create_release(publish_at: Time.zone.local(2019, 1, 9, 2))
        five = create_release(publish_at: nil)

        ReleaseReminder.generate_daily!
        assert_equal(1, ReleaseReminder.count)

        release_reminder = ReleaseReminder.first
        assert_equal(1, release_reminder.results.size)
        assert_equal(three.id, release_reminder.results.first['release_id'])
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.27 test/models/workarea/insights/release_reminder_test.rb
workarea-core-3.5.26 test/models/workarea/insights/release_reminder_test.rb
workarea-core-3.4.45 test/models/workarea/insights/release_reminder_test.rb
workarea-core-3.5.25 test/models/workarea/insights/release_reminder_test.rb
workarea-core-3.5.23 test/models/workarea/insights/release_reminder_test.rb
workarea-core-3.4.44 test/models/workarea/insights/release_reminder_test.rb
workarea-core-3.5.22 test/models/workarea/insights/release_reminder_test.rb
workarea-core-3.4.43 test/models/workarea/insights/release_reminder_test.rb
workarea-core-3.5.21 test/models/workarea/insights/release_reminder_test.rb
workarea-core-3.4.42 test/models/workarea/insights/release_reminder_test.rb
workarea-core-3.5.20 test/models/workarea/insights/release_reminder_test.rb
workarea-core-3.4.41 test/models/workarea/insights/release_reminder_test.rb
workarea-core-3.5.19 test/models/workarea/insights/release_reminder_test.rb
workarea-core-3.4.40 test/models/workarea/insights/release_reminder_test.rb
workarea-core-3.5.18 test/models/workarea/insights/release_reminder_test.rb
workarea-core-3.4.39 test/models/workarea/insights/release_reminder_test.rb
workarea-core-3.5.17 test/models/workarea/insights/release_reminder_test.rb
workarea-core-3.4.38 test/models/workarea/insights/release_reminder_test.rb
workarea-core-3.5.16 test/models/workarea/insights/release_reminder_test.rb
workarea-core-3.4.37 test/models/workarea/insights/release_reminder_test.rb