Sha256: 333b3a8dd01c2b342f10ef35e3f76a9b73caff97955a8d2ea017fcf8d9acf39a

Contents?: true

Size: 914 Bytes

Versions: 1

Compression:

Stored size: 914 Bytes

Contents

require 'rails_helper'

describe ManifestationCheckoutStat do
  fixtures :manifestation_checkout_stats

  it "calculates manifestation count" do
    old_message_count = Message.count
    manifestation_checkout_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
    ManifestationCheckoutStatJob.perform_later(manifestation_checkout_stats(:one)).should be_truthy
  end
end

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
enju_circulation-0.4.0.rc.1 spec/models/manifestation_checkout_stat_spec.rb