Sha256: 3b478cab95a8715135ff26d84843b111370ad7521f85be3803e9786810ee1ba8

Contents?: true

Size: 1.14 KB

Versions: 12

Compression:

Stored size: 1.14 KB

Contents

require 'spec_helper'

describe Qualtrics::SurveyImport, :vcr => true  do
  it 'has a survey name' do
    survey_name = 'great name'
    survey_import = Qualtrics::SurveyImport.new({
      survey_name: survey_name
    })
    expect(survey_import.survey_name).to eql(survey_name)
  end

  it 'has a survey' do
    survey_name = 'great name'
    survey_import = Qualtrics::SurveyImport.new({
      survey_name: survey_name
    })
    expect(survey_import.survey_name).to eql(survey_import.survey.survey_name)
  end

  it 'has survey file location' do
    survey_data_location = 'some location'

    survey_import = Qualtrics::SurveyImport.new({
      survey_data_location: survey_data_location
    })
    expect(survey_import.survey_data_location).to eql(survey_data_location)
  end

  it 'transmits to qualtrics' do
    survey_data_location = 'spec/fixtures/sample_survey.xml'

    survey = Qualtrics::Survey.new({
      survey_name: 'Newest Survey'
    })

    survey_import = Qualtrics::SurveyImport.new({
      survey_data_location: survey_data_location,
      survey: survey
    })

    expect(survey_import.save).to be true
    survey_import.survey.destroy
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

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