mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 17:51:13 +08:00
Add test skeleton for importing
This commit is contained in:
parent
1bd6d2a032
commit
e180d5e100
6 changed files with 1199 additions and 0 deletions
25
spec/services/model_importers/team_importer_spec.rb
Normal file
25
spec/services/model_importers/team_importer_spec.rb
Normal 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
|
|
@ -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.
Binary file not shown.
After Width: | Height: | Size: 41 KiB |
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue