Sha256: acb1cb9e3ac43fbb2cf343575949b72e0abeb900258804a17c66afb3df405cf4

Contents?: true

Size: 759 Bytes

Versions: 11

Compression:

Stored size: 759 Bytes

Contents

require 'spec_helper'

describe Qualtrics::PanelImportFile do
  let(:email) { 'user@example.com' }
  let(:recipients) {[Qualtrics::Recipient.new(email: email), Qualtrics::Recipient.new] }
  let(:panel_import_file) do
    Qualtrics::PanelImportFile.new(recipients)
  end

  it 'has a list of recipients' do
    expect(panel_import_file.recipients).to eql(recipients)
  end

  it 'writes a temp file' do
    expect(panel_import_file.temp_file).to_not be_nil
    expect(FileTest.exists?(panel_import_file.temp_file)).to be true
  end

  it 'contains a header' do
    expect(File.read(panel_import_file.temp_file)).to include("FirstName")
  end

  it 'contains a row of recipients' do
    expect(File.read(panel_import_file.temp_file)).to include(email)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
qualtrics-0.6.1 spec/qualtrics/panel_import_file_spec.rb
qualtrics-0.6.0 spec/qualtrics/panel_import_file_spec.rb
qualtrics-0.5.9b spec/qualtrics/panel_import_file_spec.rb
qualtrics-0.5.9 spec/qualtrics/panel_import_file_spec.rb
qualtrics-0.5.8 spec/qualtrics/panel_import_file_spec.rb
qualtrics-0.5.7 spec/qualtrics/panel_import_file_spec.rb
qualtrics-0.5.6 spec/qualtrics/panel_import_file_spec.rb
qualtrics-0.5.5 spec/qualtrics/panel_import_file_spec.rb
qualtrics-0.5.4 spec/qualtrics/panel_import_file_spec.rb
qualtrics-0.5.3 spec/qualtrics/panel_import_file_spec.rb
qualtrics-0.5.2 spec/qualtrics/panel_import_file_spec.rb