From f71cabcd6011b42ced86e0cdf8c5354af0bd7516 Mon Sep 17 00:00:00 2001 From: Jure Grabnar Date: Mon, 5 Aug 2019 19:05:15 +0200 Subject: [PATCH] Fix templates tests --- app/services/team_importer.rb | 5 ----- spec/services/model_importers/team_importer_spec.rb | 2 -- .../model_importers/test_experiment_data/experiment.json | 7 ------- 3 files changed, 14 deletions(-) diff --git a/app/services/team_importer.rb b/app/services/team_importer.rb index 7ef0daccb..d498cd669 100644 --- a/app/services/team_importer.rb +++ b/app/services/team_importer.rb @@ -172,11 +172,6 @@ class TeamImporter ActiveRecord::Base.no_touching do experiment = create_experiment(experiment_json, project, user_id) - experiment.my_modules.each do |my_module| - my_module.nr_of_assigned_samples = 0 - my_module.save(touch: false) - end - # Create connections for modules experiment_json['my_modules'].each do |my_module_json| create_task_connections(my_module_json['outputs']) diff --git a/spec/services/model_importers/team_importer_spec.rb b/spec/services/model_importers/team_importer_spec.rb index 9a748cb4a..947509e00 100644 --- a/spec/services/model_importers/team_importer_spec.rb +++ b/spec/services/model_importers/team_importer_spec.rb @@ -159,8 +159,6 @@ describe TeamImporter do expect(db_module.my_module_group_id).to be_nil end - expect(db_module.nr_of_assigned_samples).to be_zero - # Check if callbacks for protocols are turned off expect(db_module.protocols.count).to eq 1 diff --git a/spec/services/model_importers/test_experiment_data/experiment.json b/spec/services/model_importers/test_experiment_data/experiment.json index 1f85e2c00..2dccfe10c 100644 --- a/spec/services/model_importers/test_experiment_data/experiment.json +++ b/spec/services/model_importers/test_experiment_data/experiment.json @@ -50,7 +50,6 @@ "last_modified_by_id": 1, "my_module_group_id": null, "name": "Data analysis - Pfaffl method", - "nr_of_assigned_samples": 0, "restored_by_id": 1, "restored_on": "2019-01-21T13:31:37.000Z", "state": "uncompleted", @@ -138,7 +137,6 @@ "last_modified_by_id": 1, "my_module_group_id": null, "name": "Lonely task", - "nr_of_assigned_samples": 0, "restored_by_id": null, "restored_on": null, "state": "uncompleted", @@ -264,7 +262,6 @@ "last_modified_by_id": 1, "my_module_group_id": 13, "name": "Workflow 2 - task 2", - "nr_of_assigned_samples": 0, "restored_by_id": null, "restored_on": null, "state": "uncompleted", @@ -368,7 +365,6 @@ "last_modified_by_id": 1, "my_module_group_id": 13, "name": "Workflow 2 - task 1", - "nr_of_assigned_samples": 0, "restored_by_id": null, "restored_on": null, "state": "uncompleted", @@ -481,7 +477,6 @@ "last_modified_by_id": null, "my_module_group_id": 14, "name": "Experiment design", - "nr_of_assigned_samples": 0, "restored_by_id": null, "restored_on": null, "state": "uncompleted", @@ -679,7 +674,6 @@ "last_modified_by_id": null, "my_module_group_id": 14, "name": "Reverse transcription", - "nr_of_assigned_samples": 4, "restored_by_id": null, "restored_on": null, "state": "uncompleted", @@ -976,7 +970,6 @@ "last_modified_by_id": null, "my_module_group_id": 14, "name": "RNA quality & quantity - BIOANALYSER", - "nr_of_assigned_samples": 4, "restored_by_id": null, "restored_on": null, "state": "uncompleted",