X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f4ca9ad94a6bb006d1f3c7ba207837f1736d1247..4139c5dfde60cdd20d39f385ca36107b0c44906f:/services/api/test/unit/app_version_test.rb diff --git a/services/api/test/unit/app_version_test.rb b/services/api/test/unit/app_version_test.rb index 3e9b16757d..dd88004270 100644 --- a/services/api/test/unit/app_version_test.rb +++ b/services/api/test/unit/app_version_test.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + require 'test_helper' class AppVersionTest < ActiveSupport::TestCase @@ -20,16 +24,19 @@ class AppVersionTest < ActiveSupport::TestCase end end - test 'override with configuration' do + test 'override with configuration "foobar"' do Rails.configuration.source_version = 'foobar' assert_equal 'foobar', AppVersion.hash + end + + test 'override with configuration false' do Rails.configuration.source_version = false assert_not_equal 'foobar', AppVersion.hash end test 'override with file' do path = Rails.root.join 'git-commit.version' - assert(!File.exists?(path), + assert(!File.exist?(path), "Packaged version file found in source tree: #{path}") begin File.open(path, 'w') do |f|