Sha256: 045421e6ddf795205578ba92a97c01e96771f90c1e7a5f32b67a9216d1ad8b9c

Contents?: true

Size: 859 Bytes

Versions: 5

Compression:

Stored size: 859 Bytes

Contents

require 'rails_helper'

describe EventExportFile do
  fixtures :all

  it "should export in background" do
    message_count = Message.count
    file = EventExportFile.new
    file.user = users(:admin)
    file.save
    EventExportFileJob.perform_later(file).should be_truthy
    Message.count.should eq message_count + 1
    Message.order(:id).last.subject.should eq 'エクスポートが完了しました'
  end
end

# == Schema Information
#
# Table name: event_export_files
#
#  id                        :integer          not null, primary key
#  user_id                   :integer
#  event_export_file_name    :string
#  event_export_content_type :string
#  event_export_file_size    :integer
#  event_export_updated_at   :datetime
#  executed_at               :datetime
#  created_at                :datetime
#  updated_at                :datetime
#

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
enju_event-0.3.2 spec/models/event_export_file_spec.rb
enju_event-0.3.1 spec/models/event_export_file_spec.rb
enju_event-0.3.0 spec/models/event_export_file_spec.rb
enju_event-0.3.0.rc.1 spec/models/event_export_file_spec.rb
enju_event-0.3.0.beta.1 spec/models/event_export_file_spec.rb