spec: fix brittle specs

the order of the first two items in each of these arrays is not guaranteed

Change-Id: I15c457eab8028ac0bcf264f9171e596a4d2ecb54
Reviewed-on: https://gerrit.instructure.com/73835
Tested-by: Jenkins
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
This commit is contained in:
Jon Jensen 2016-03-04 22:11:19 -07:00
parent a7cbfdef78
commit 8df7b7f4e7
1 changed files with 3 additions and 3 deletions

View File

@ -259,7 +259,7 @@ describe CoursesController, type: :request do
:format => 'json',
:include => [ "observed_users" ] })
expect(json['enrollments']).to eq [{
expect(json['enrollments']).to match_array [{
"type" => "observer",
"role" => @assigned_observer_enrollment.role.name,
"role_id" => @assigned_observer_enrollment.role.id,
@ -289,7 +289,7 @@ describe CoursesController, type: :request do
:format => 'json',
:include => [ "observed_users" ] })
expect(json[0]['enrollments']).to eq [{
expect(json[0]['enrollments']).to match_array [{
"type" => "observer",
"role" => @assigned_observer_enrollment.role.name,
"role_id" => @assigned_observer_enrollment.role.id,
@ -318,7 +318,7 @@ describe CoursesController, type: :request do
:id => @observer_course.to_param,
:format => 'json' })
expect(json[0]['enrollments']).to eq [{
expect(json[0]['enrollments']).to match_array [{
"type" => "observer",
"role" => @assigned_observer_enrollment.role.name,
"role_id" => @assigned_observer_enrollment.role.id,