Skip to content

Commit

Permalink
spec: ensure consistent ordering
Browse files Browse the repository at this point in the history
order by context type, then id. previously it just ordered by id, and since
we're comparing apples and oranges (well, courses and accounts), there's no
guarantee that one's sequence would be higher/lower than the other (depends
on which specs run beforehand)

Change-Id: I3e91d67c9cbf60d0151f0c8d52627d23ffa173f5
Reviewed-on: https://gerrit.instructure.com/70536
Tested-by: Jenkins
Reviewed-by: Shawn Meredith <[email protected]>
Product-Review: Shawn Meredith <[email protected]>
QA-Review: Shawn Meredith <[email protected]>
  • Loading branch information
jenseng committed Jan 19, 2016
1 parent 0b1f399 commit e0b9772
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gems/plugins/account_reports/spec_canvas/lti_reports_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
end

it 'should run on a root account' do
parsed = read_report(@type, {order: 1})
parsed = read_report(@type, {order: [0, 1]})
expect(parsed.length).to eq 2
expect(parsed[0]).to eq([
@t1.context_type,
Expand All @@ -70,7 +70,7 @@
end

it 'should run on a sub account' do
parsed = read_report(@type, {account: @sub_account})
parsed = read_report(@type, {order: [0, 1], account: @sub_account})
expect(parsed.length).to eq 2
expect(parsed[1]).to eq([
@t2.context_type,
Expand Down

0 comments on commit e0b9772

Please sign in to comment.