Sha256: 0de47fef61efd3df1f74781965ade08a1aabd533a51b48111d7d1a4ec003bfde

Contents?: true

Size: 875 Bytes

Versions: 26

Compression:

Stored size: 875 Bytes

Contents

require 'rails_helper'

describe ManifestationReserveStat do
  fixtures :manifestation_reserve_stats

  it "calculates manifestation count" do
    old_message_count = Message.count
    manifestation_reserve_stats(:one).transition_to!(:started).should be_truthy
    Message.count.should eq old_message_count + 1
    Message.order(:id).last.subject.should eq '集計が完了しました'
  end

  it "should calculate in background" do
    ManifestationReserveStatJob.perform_later(manifestation_reserve_stats(:one)).should be_truthy
  end
end

# == Schema Information
#
# Table name: manifestation_reserve_stats
#
#  id           :integer          not null, primary key
#  start_date   :datetime
#  end_date     :datetime
#  note         :text
#  created_at   :datetime
#  updated_at   :datetime
#  started_at   :datetime
#  completed_at :datetime
#  user_id      :integer
#

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
enju_circulation-0.3.11 spec/models/manifestation_reserve_stat_spec.rb
enju_circulation-0.3.10 spec/models/manifestation_reserve_stat_spec.rb
enju_circulation-0.3.9 spec/models/manifestation_reserve_stat_spec.rb
enju_circulation-0.3.8 spec/models/manifestation_reserve_stat_spec.rb
enju_circulation-0.3.7 spec/models/manifestation_reserve_stat_spec.rb
enju_circulation-0.4.0.beta.4 spec/models/manifestation_reserve_stat_spec.rb
enju_circulation-0.4.0.beta.3 spec/models/manifestation_reserve_stat_spec.rb
enju_circulation-0.3.6 spec/models/manifestation_reserve_stat_spec.rb
enju_circulation-0.4.0.beta.2 spec/models/manifestation_reserve_stat_spec.rb
enju_circulation-0.4.0.beta.1 spec/models/manifestation_reserve_stat_spec.rb
enju_circulation-0.3.5 spec/models/manifestation_reserve_stat_spec.rb
enju_circulation-0.3.4 spec/models/manifestation_reserve_stat_spec.rb
enju_circulation-0.3.3 spec/models/manifestation_reserve_stat_spec.rb
enju_circulation-0.3.2 spec/models/manifestation_reserve_stat_spec.rb
enju_circulation-0.3.1 spec/models/manifestation_reserve_stat_spec.rb
enju_circulation-0.3.0 spec/models/manifestation_reserve_stat_spec.rb
enju_circulation-0.3.0.rc.1 spec/models/manifestation_reserve_stat_spec.rb
enju_circulation-0.3.0.beta.1 spec/models/manifestation_reserve_stat_spec.rb
enju_circulation-0.2.5 spec/models/manifestation_reserve_stat_spec.rb
enju_circulation-0.2.4 spec/models/manifestation_reserve_stat_spec.rb