Sha256: 65781699ef193883d2384fca3bee84cbf7c7fc0c4b713893b59e8a22f6f45adb

Contents?: true

Size: 966 Bytes

Versions: 2

Compression:

Stored size: 966 Bytes

Contents

require "test_helper"

class CustomCalendarIntegrationTest < ActionDispatch::IntegrationTest
  test "renders a custom calendar" do
    get business_week_meetings_path
    assert_select "div.simple-calendar"
  end

  test "calendar renders events" do
    get business_week_meetings_path
    assert_select "div.simple-calendar" do
      assert_select "div", text: meetings(:one_day_event).name
    end
  end

  test "calendar render two day events" do
    event = meetings(:two_day_event)
    get business_week_meetings_path, params: {start_date: event.start_time.to_date}
    assert_select "div.simple-calendar" do
      assert_select "div", text: event.name, count: 2
    end
  end

  test "calendar render three day events" do
    event = meetings(:three_day_event)
    get business_week_meetings_path, params: {start_date: event.start_time.to_date}
    assert_select "div.simple-calendar" do
      assert_select "div", text: event.name, count: 3
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
simple_calendar-3.0.2 test/integrations/custom_calendar_test.rb
simple_calendar-3.0.1 test/integrations/custom_calendar_test.rb