Skip to content

Commit a5f2d25

Browse files
committed
Fix order-dependent assertion in course details controller spec
1 parent a4c8388 commit a5f2d25

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

spec/controllers/setup/course_details_controller_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
expect(Course.last.cached_version).to eq(1)
214214
post :create, params: { organization_id: @organization.slug, course: { name: 'NewCourse2', title: 'New Course 2', source_url: @ct.source_url } }
215215
RefreshCourseTask.new.run
216-
expect(Course.all.pluck(:cached_version)).to eq([0, 1, 1]) # Sometimes fails, don't worry
216+
expect(Course.order(:id).pluck(:cached_version)).to eq([0, 1, 1])
217217
expect(Dir["#{@test_tmp_dir}/cache/git_repos/*"].count).to be(2)
218218
end
219219
end

0 commit comments

Comments
 (0)