diff options
author | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-12-07 21:15:06 +0300 |
---|---|---|
committer | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-12-14 21:36:22 +0300 |
commit | 44fef4fe4cb9d4f30f129ff5a548395bc924c8fe (patch) | |
tree | ac5e97a16658edfb25b8407f1cf2d9a11c172667 /spec | |
parent | eafc8e2f481751b973260287c844b70bd408dcb2 (diff) |
Remove rails 4 support in CI, Gemfiles, bin/ and config/
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/database/migration_helpers_spec.rb | 7 | ||||
-rw-r--r-- | spec/lib/gitlab/database_spec.rb | 6 | ||||
-rw-r--r-- | spec/lib/gitlab/github_import/importer/pull_request_importer_spec.rb | 7 | ||||
-rw-r--r-- | spec/spec_helper.rb | 4 |
4 files changed, 4 insertions, 20 deletions
diff --git a/spec/lib/gitlab/database/migration_helpers_spec.rb b/spec/lib/gitlab/database/migration_helpers_spec.rb index 23f27939dd2..4e83b27e4a5 100644 --- a/spec/lib/gitlab/database/migration_helpers_spec.rb +++ b/spec/lib/gitlab/database/migration_helpers_spec.rb @@ -1338,12 +1338,7 @@ describe Gitlab::Database::MigrationHelpers do end describe '#index_exists_by_name?' do - # TODO: remove rails5-only after removing rails4 tests - # rails 4 can not handle multiple indexes on the same column set if - # index was added by 't.index' - t.index is used by default in schema.rb in - # rails 5. Let's run this test only in rails 5 env: - # see https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21492#note_113602758 - it 'returns true if an index exists', :rails5 do + it 'returns true if an index exists' do expect(model.index_exists_by_name?(:projects, 'index_projects_on_path')) .to be_truthy end diff --git a/spec/lib/gitlab/database_spec.rb b/spec/lib/gitlab/database_spec.rb index fc295b2deff..0826bc3eeed 100644 --- a/spec/lib/gitlab/database_spec.rb +++ b/spec/lib/gitlab/database_spec.rb @@ -462,8 +462,7 @@ describe Gitlab::Database do expect(described_class.db_read_only?).to be_truthy end - # TODO: remove rails5-only tag after removing rails4 tests - it 'detects a read only database', :rails5 do + it 'detects a read only database' do allow(ActiveRecord::Base.connection).to receive(:execute).with('SELECT pg_is_in_recovery()').and_return([{ "pg_is_in_recovery" => true }]) expect(described_class.db_read_only?).to be_truthy @@ -475,8 +474,7 @@ describe Gitlab::Database do expect(described_class.db_read_only?).to be_falsey end - # TODO: remove rails5-only tag after removing rails4 tests - it 'detects a read write database', :rails5 do + it 'detects a read write database' do allow(ActiveRecord::Base.connection).to receive(:execute).with('SELECT pg_is_in_recovery()').and_return([{ "pg_is_in_recovery" => false }]) expect(described_class.db_read_only?).to be_falsey diff --git a/spec/lib/gitlab/github_import/importer/pull_request_importer_spec.rb b/spec/lib/gitlab/github_import/importer/pull_request_importer_spec.rb index efca8564894..25684ea9e2c 100644 --- a/spec/lib/gitlab/github_import/importer/pull_request_importer_spec.rb +++ b/spec/lib/gitlab/github_import/importer/pull_request_importer_spec.rb @@ -240,12 +240,7 @@ describe Gitlab::GithubImport::Importer::PullRequestImporter, :clean_gitlab_redi .and_return(user.id) end - # TODO: remove rails5-only after removing rails4 tests - # rails 4 can not handle multiple indexes on the same column set if - # index was added by 't.index' - t.index is used by default in schema.rb in - # rails 5. Let's run this test only in rails 5 env: - # see https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21492#note_113602758 - it 'returns the existing merge request', :rails5 do + it 'returns the existing merge request' do mr1, exists1 = importer.create_merge_request mr2, exists2 = importer.create_merge_request diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 3fedb9ed48c..cd69160be10 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -235,10 +235,6 @@ RSpec.configure do |config| example.run if Gitlab::Database.mysql? end - config.around(:each, :rails5) do |example| - example.run if Gitlab.rails5? - end - # This makes sure the `ApplicationController#can?` method is stubbed with the # original implementation for all view specs. config.before(:each, type: :view) do |