Sha256: e0a09f16b14970910665ea42fb208505cf86df1f2dabeb87d768ef6d3c8fb24c

Contents?: true

Size: 888 Bytes

Versions: 3

Compression:

Stored size: 888 Bytes

Contents

# -*- encoding: utf-8 -*-
require 'spec_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

3 entries across 3 versions & 1 rubygems

Version Path
enju_event-0.2.0.beta.3 spec/models/event_export_file_spec.rb
enju_event-0.2.0.beta.2 spec/models/event_export_file_spec.rb
enju_event-0.2.0.beta.1 spec/models/event_export_file_spec.rb