Sha256: 86589fe990632b8f970cc4adaf7436948a7b6e02160e648aa4537af42946663b
Contents?: true
Size: 678 Bytes
Versions: 2
Compression:
Stored size: 678 Bytes
Contents
require "spec_helper" require "byebug" describe ActsAsFullCalendarEvent::FullCalendarEventSerializer do let!(:event1) { create(:event, start_at: Date.new(2018, 1, 1), end_at: Date.new(2018, 1, 31), category_id: 1, user_id: 1) } it "returns correct json" do serializer = ActsAsFullCalendarEvent::FullCalendarEventSerializer.new(event1) result = serializer.serializable_hash expect(result).to eq({ id: 1, start: Date.new(2018, 1, 1), end: Date.new(2018, 1, 31), title: "title", color: "#FF0000", textColor: "#AAFFBB", link_url: "URL", link_data_target: "#modal", link_data_toggle: "modal" }) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
acts_as_full_calendar_event-1.0.2 | spec/serializers/full_calendar_event_serializer_spec.rb |
acts_as_full_calendar_event-1.0.1 | spec/serializers/full_calendar_event_serializer_spec.rb |