Merge branch 'master' into 4194-keep-logging
[arvados.git] / services / api / test / functional / arvados / v1 / commits_controller_test.rb
index 788cd83c797be3a8d7b9940d30f42f454becbea7..ceaebffb2305b2255b556c7c28519606f384910a 100644 (file)
@@ -1,5 +1,5 @@
 require 'test_helper'
-load 'test/functional/arvados/v1/git_setup.rb'
+require 'helpers/git_test_helper'
 
 # NOTE: calling Commit.find_commit_range(user, nil, nil, 'rev') will produce
 # an error message "fatal: bad object 'rev'" on stderr if 'rev' does not exist
@@ -13,7 +13,7 @@ class Arvados::V1::CommitsControllerTest < ActionController::TestCase
   fixtures :repositories, :users
 
   # See git_setup.rb for the commit log for test.git.tar
-  include GitSetup
+  include GitTestHelper
 
   test "test_find_commit_range" do
     authorize_with :active
@@ -25,7 +25,8 @@ class Arvados::V1::CommitsControllerTest < ActionController::TestCase
   #test "test_branch1" do
     # complains "fatal: bad object 077ba2ad3ea24a929091a9e6ce545c93199b8e57"
     a = Commit.find_commit_range(users(:active), nil, nil, 'master', nil)
-    assert_equal ['f35f99b7d32bac257f5989df02b9f12ee1a9b0d6', '077ba2ad3ea24a929091a9e6ce545c93199b8e57'], a
+    assert_includes(a, 'f35f99b7d32bac257f5989df02b9f12ee1a9b0d6')
+    assert_includes(a, '077ba2ad3ea24a929091a9e6ce545c93199b8e57')
 
   #test "test_branch2" do
     a = Commit.find_commit_range(users(:active), 'foo', nil, 'b1', nil)