Add test skeleton for importing

This commit is contained in:
Jure Grabnar 2019-01-23 07:55:16 +01:00
parent 1bd6d2a032
commit e180d5e100
6 changed files with 1199 additions and 0 deletions

View file

@ -0,0 +1,25 @@
# frozen_string_literal: true
require 'rails_helper'
describe TeamImporter do
describe '#import_template_experiment_from_dir' do
before :all do
time = Time.new(2015, 8, 1, 14, 35, 0)
@user = create :user
@team = create :team
@project = create :project, name: 'Project', visibility: 1, team: @team,
archived: false, created_at: time
@team_importer = TeamImporter.new
@exp = @team_importer
.import_template_experiment_from_dir(
'spec/services/model_importers/test_experiment_data',
1, 1
)
end
it { expect(@exp.name).to eq 'Experiment export' }
it { expect(@exp.created_at).to eq '2019-01-21T13:27:53.342Z' }
it { expect(@exp.archived).to eq '2019-01-21T13:27:53.342Z' }
end
end

View file

@ -0,0 +1,4 @@
Sample name Sample type
sample6 sample
sample7 sample
sample8 sample

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

File diff suppressed because it is too large Load diff