Skip to content

Commit

Permalink
Added check of entity creation to bulk upload tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
gsrohde committed Mar 17, 2017
1 parent c106e74 commit 3d5a609
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions spec/features/bulk_upload_integration_2_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,9 @@
expect(page).not_to have_content('error')
click_link 'Specify'
click_button 'Confirm'
expect { click_button 'Insert Data' }.to change { Trait.count }.by( 2 ).and change { Covariate.count }.by 2;
expect { click_button 'Insert Data' }.to change { Trait.count }.by(2)
.and change { Covariate.count }.by(2)
.and change { Entity.count }.by 1; # The two rows in the file have the same entity name.
expect(first("div.alert-success")).to have_content("Data from valid-test-data-with-traits-not-in-associations-table.csv was successfully uploaded.")
end

Expand Down Expand Up @@ -582,7 +584,9 @@
expect(page).not_to have_content('error')
click_link 'Specify'
click_button 'Confirm'
expect { click_button 'Insert Data' }.to change { Trait.count }.by( 2 ).and change { Covariate.count }.by 2;
expect { click_button 'Insert Data' }.to change { Trait.count }.by(2)
.and change { Covariate.count }.by(2)
.and change { Entity.count }.by 1; # The two rows in the file have the same entity name.
expect(first("div.alert-success")).to have_content("Data from valid-test-data.csv was successfully uploaded.")
end

Expand All @@ -601,7 +605,9 @@
click_button 'Upload'
click_link 'Specify'
click_button 'Confirm'
expect { click_button 'Insert Data' }.to change { Trait.count }.by( 2 ).and change { Covariate.count }.by 2;
expect { click_button 'Insert Data' }.to change { Trait.count }.by( 2 )
.and change { Covariate.count }.by(2)
.and change { Entity.count }.by 1; # The two rows in the file have the same entity name.
expect(first("div.alert-success")).to have_content("Data from blank_cells_in_notes_column.csv was successfully uploaded.")
end

Expand Down

0 comments on commit 3d5a609

Please sign in to comment.