Sha256: f04650842fd2fc427e218245b17cf3060db7607d3206e4b54cbdcaba0a7dce2a

Contents?: true

Size: 817 Bytes

Versions: 28

Compression:

Stored size: 817 Bytes

Contents

require 'test_helper'

module Workarea
  module Admin
    class ReleasesFeedViewModelTest < TestCase
      def test_calendar
        foo_release = create_release(name: 'Foo', publish_at: 1.hour.from_now)
        bar_release = create_release(name: 'Bar', publish_at: 1.week.from_now)

        view_model = ReleasesFeedViewModel.new
        feed = view_model.calendar

        assert_equal(2, feed.events.length)

        assert_equal('Foo', feed.events.first.summary)
        assert_equal('Bar', feed.events.second.summary)

        assert_equal(foo_release.publish_at.to_s, feed.events.first.dtstart.to_s)
        assert(feed.events.first.dtend.present?)

        assert_equal(bar_release.publish_at.to_s, feed.events.second.dtstart.to_s)
        assert(feed.events.second.dtend.present?)
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
workarea-admin-3.5.27 test/view_models/workarea/admin/releases_feed_view_model_test.rb
workarea-admin-3.5.26 test/view_models/workarea/admin/releases_feed_view_model_test.rb
workarea-admin-3.5.25 test/view_models/workarea/admin/releases_feed_view_model_test.rb
workarea-admin-3.5.23 test/view_models/workarea/admin/releases_feed_view_model_test.rb
workarea-admin-3.5.22 test/view_models/workarea/admin/releases_feed_view_model_test.rb
workarea-admin-3.5.21 test/view_models/workarea/admin/releases_feed_view_model_test.rb
workarea-admin-3.5.20 test/view_models/workarea/admin/releases_feed_view_model_test.rb
workarea-admin-3.5.19 test/view_models/workarea/admin/releases_feed_view_model_test.rb
workarea-admin-3.5.18 test/view_models/workarea/admin/releases_feed_view_model_test.rb
workarea-admin-3.5.17 test/view_models/workarea/admin/releases_feed_view_model_test.rb
workarea-admin-3.5.16 test/view_models/workarea/admin/releases_feed_view_model_test.rb
workarea-admin-3.5.15 test/view_models/workarea/admin/releases_feed_view_model_test.rb
workarea-admin-3.5.14 test/view_models/workarea/admin/releases_feed_view_model_test.rb
workarea-admin-3.5.13 test/view_models/workarea/admin/releases_feed_view_model_test.rb
workarea-admin-3.5.12 test/view_models/workarea/admin/releases_feed_view_model_test.rb
workarea-admin-3.5.11 test/view_models/workarea/admin/releases_feed_view_model_test.rb
workarea-admin-3.5.10 test/view_models/workarea/admin/releases_feed_view_model_test.rb
workarea-admin-3.5.9 test/view_models/workarea/admin/releases_feed_view_model_test.rb
workarea-admin-3.5.8 test/view_models/workarea/admin/releases_feed_view_model_test.rb
workarea-admin-3.5.7 test/view_models/workarea/admin/releases_feed_view_model_test.rb