Sha256: 7648d4623e5ffc25ae440ffea1611e84d92928c6382740249085f434d0b6a021

Contents?: true

Size: 972 Bytes

Versions: 44

Compression:

Stored size: 972 Bytes

Contents

# -*- encoding: utf-8 -*-
require 'spec_helper'

describe Event do
  fixtures :events

  it "should set_all_day" do
    event = events(:event_00001)
    event.all_day = true
    event.set_all_day
    event.all_day.should be_true
  end

  it "should set all_day and beginning_of_day" do
    event = events(:event_00008)
    event.all_day = true
    event.set_all_day
    event.start_at.should eq event.end_at.beginning_of_day
  end
end

# == Schema Information
#
# Table name: events
#
#  id                :integer         not null, primary key
#  library_id        :integer         default(1), not null
#  event_category_id :integer         default(1), not null
#  name              :string(255)
#  note              :text
#  start_at          :datetime
#  end_at            :datetime
#  all_day           :boolean         default(FALSE), not null
#  deleted_at        :datetime
#  created_at        :datetime
#  updated_at        :datetime
#  display_name      :text
#

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
enju_event-0.1.17.pre4 spec/models/event_spec.rb
enju_event-0.1.17.pre3 spec/models/event_spec.rb
enju_event-0.1.17.pre2 spec/models/event_spec.rb
enju_event-0.1.17.pre spec/models/event_spec.rb
enju_event-0.1.16 spec/models/event_spec.rb
enju_event-0.1.15 spec/models/event_spec.rb
enju_event-0.1.13 spec/models/event_spec.rb
enju_event-0.0.27 spec/models/event_spec.rb
enju_event-0.0.26 spec/models/event_spec.rb
enju_event-0.0.25 spec/models/event_spec.rb
enju_event-0.1.12 spec/models/event_spec.rb
enju_event-0.1.11 spec/models/event_spec.rb
enju_event-0.0.24 spec/models/event_spec.rb
enju_event-0.0.23 spec/models/event_spec.rb
enju_event-0.1.10 spec/models/event_spec.rb
enju_event-0.1.9 spec/models/event_spec.rb
enju_event-0.0.22 spec/models/event_spec.rb
enju_event-0.0.21 spec/models/event_spec.rb
enju_event-0.1.8 spec/models/event_spec.rb
enju_event-0.0.20 spec/models/event_spec.rb