summaryrefslogtreecommitdiff
path: root/spec/mailers
diff options
context:
space:
mode:
authorHeinrich Lee Yu <hleeyu@gmail.com>2019-01-03 13:17:07 +0800
committerHeinrich Lee Yu <hleeyu@gmail.com>2019-01-07 11:21:30 +0800
commitf54290de751e365be0928c66bb75fd106bb7aa88 (patch)
treeda09c1505ede95633e7312080ab48986ae7382cb /spec/mailers
parente2698d5d7455d91fa94f9bbf1fc838f8cb142700 (diff)
downloadgitlab-ce-f54290de751e365be0928c66bb75fd106bb7aa88.tar.gz
Remove caching of CSV file49231-import-issues-csv
Load whole file in memory to simplify code
Diffstat (limited to 'spec/mailers')
-rw-r--r--spec/mailers/emails/issues_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/mailers/emails/issues_spec.rb b/spec/mailers/emails/issues_spec.rb
index 68c87803b78..09253cf8003 100644
--- a/spec/mailers/emails/issues_spec.rb
+++ b/spec/mailers/emails/issues_spec.rb
@@ -13,19 +13,19 @@ describe Emails::Issues do
subject { Notify.import_issues_csv_email(user.id, project.id, @results) }
it "shows number of successful issues imported" do
- @results = { success: 165, errors: [], valid_file: true }
+ @results = { success: 165, error_lines: [], parse_error: false }
expect(subject).to have_body_text "165 issues imported"
end
it "shows error when file is invalid" do
- @results = { success: 0, errors: [], valid_file: false }
+ @results = { success: 0, error_lines: [], parse_error: true }
expect(subject).to have_body_text "Error parsing CSV"
end
it "shows line numbers with errors" do
- @results = { success: 0, errors: [23, 34, 58], valid_file: false }
+ @results = { success: 0, error_lines: [23, 34, 58], parse_error: false }
expect(subject).to have_body_text "23, 34, 58"
end