|
10 | 10 | organization: organization, |
11 | 11 | storage_location: storage_location, |
12 | 12 | comment: "First adjustment", |
13 | | - created_at: 1.day.ago |
14 | | - ) |
| 13 | + created_at: 1.day.ago) |
15 | 14 | adj.line_items << build(:line_item, quantity: 10, item: item1, itemizable: adj) |
16 | 15 | adj.line_items << build(:line_item, quantity: 5, item: item2, itemizable: adj) |
17 | 16 | adj |
|
22 | 21 | organization: organization, |
23 | 22 | storage_location: storage_location, |
24 | 23 | comment: "Second adjustment", |
25 | | - created_at: 5.days.ago |
26 | | - ) |
| 24 | + created_at: 5.days.ago) |
27 | 25 | adj.line_items << build(:line_item, quantity: -5, item: item1, itemizable: adj) |
28 | 26 | adj |
29 | 27 | end |
|
37 | 35 | it "returns a CSV file" do |
38 | 36 | get :index, format: :csv |
39 | 37 | expect(response).to be_successful |
40 | | - expect(response.header['Content-Type']).to include 'text/csv' |
| 38 | + expect(response.header["Content-Type"]).to include "text/csv" |
41 | 39 | end |
42 | 40 |
|
43 | 41 | it "includes appropriate headers for adjustments" do |
|
72 | 70 | start_date = 3.days.ago.to_fs(:date_picker) |
73 | 71 | end_date = Time.zone.today.to_fs(:date_picker) |
74 | 72 |
|
75 | | - get :index, params: { filters: { date_range: "#{start_date} - #{end_date}" } }, format: :csv |
| 73 | + get :index, params: {filters: {date_range: "#{start_date} - #{end_date}"}}, format: :csv |
76 | 74 |
|
77 | 75 | parsed_csv = CSV.parse(response.body, headers: true) |
78 | 76 | expect(parsed_csv.count).to eq(1) |
|
0 commit comments