Skip to content
Snippets Groups Projects
Commit 21459f1a authored by Stan Hu's avatar Stan Hu
Browse files

Merge branch 'sh-upgrade-ruby-2.7.2-ci' into 'master'

Upgrade to Ruby v2.7.2

See merge request gitlab-org/gitlab!44223
parents 213b2354 e2f8775e
No related branches found
No related tags found
No related merge requests found
Showing
with 20 additions and 17 deletions
Loading
Loading
@@ -40,7 +40,7 @@
end
 
it 'tracks the event' do
expect(Gitlab::Tracking).to receive(:event).with(anything, 'list_tags', {})
expect(Gitlab::Tracking).to receive(:event).with(anything, 'list_tags')
 
get_tags
end
Loading
Loading
@@ -109,7 +109,7 @@ def get_tags
 
it 'tracks the event' do
expect_delete_tags(%w[test.])
expect(controller).to receive(:track_event).with(:delete_tag, {})
expect(controller).to receive(:track_event).with(:delete_tag)
 
destroy_tag('test.')
end
Loading
Loading
@@ -150,7 +150,7 @@ def destroy_tag(name)
 
it 'tracks the event' do
expect_delete_tags(tags)
expect(Gitlab::Tracking).to receive(:event).with(anything, 'delete_tag_bulk', {})
expect(Gitlab::Tracking).to receive(:event).with(anything, 'delete_tag_bulk')
 
bulk_destroy_tags(tags)
end
Loading
Loading
Loading
Loading
@@ -12,6 +12,9 @@
describe 'when I delete my account' do
before do
visit profile_account_path
# Scroll page to the bottom to make Delete account button visible
execute_script('window.scrollTo(0, document.body.scrollHeight)')
end
 
it { expect(page).to have_content('Delete account') }
Loading
Loading
Loading
Loading
@@ -36,7 +36,7 @@
let(:args) { {} }
 
it 'raises an error' do
expect { resolve_release }.to raise_error(ArgumentError, "missing keyword: tag_name")
expect { resolve_release }.to raise_error(ArgumentError, "missing keyword: :tag_name")
end
end
end
Loading
Loading
Loading
Loading
@@ -177,7 +177,7 @@
 
describe '#track_event' do
it "creates a gitlab tracking event" do
expect(Gitlab::Tracking).to receive(:event).with('foo', 'my_event', {})
expect(Gitlab::Tracking).to receive(:event).with('foo', 'my_event')
 
subject.track_event('my_event', category: 'foo')
end
Loading
Loading
Loading
Loading
@@ -15,14 +15,14 @@
context 'when unknown keyword is specified' do
it 'raises error' do
expect { described_class.new(key: variable_key, value: 'abc', files: true) }
.to raise_error ArgumentError, 'unknown keyword: files'
.to raise_error ArgumentError, 'unknown keyword: :files'
end
end
 
context 'when required keywords are not specified' do
it 'raises error' do
expect { described_class.new(key: variable_key) }
.to raise_error ArgumentError, 'missing keyword: value'
.to raise_error ArgumentError, 'missing keyword: :value'
end
end
 
Loading
Loading
Loading
Loading
@@ -38,7 +38,7 @@
end
 
it 'attemps to load a first strategy' do
expect(first).to receive(:new).with('something', anything)
expect(first).to receive(:new).with('something')
 
entry.new('something')
end
Loading
Loading
@@ -53,7 +53,7 @@
end
 
it 'attemps to load a second strategy' do
expect(second).to receive(:new).with('test', anything)
expect(second).to receive(:new).with('test')
 
entry.new('test')
end
Loading
Loading
@@ -68,7 +68,7 @@
end
 
it 'instantiates an unknown strategy' do
expect(unknown).to receive(:new).with('test', anything)
expect(unknown).to receive(:new).with('test')
 
entry.new('test')
end
Loading
Loading
Loading
Loading
@@ -62,7 +62,7 @@
context 'param without label' do
let(:params) { { create_issue: '1' } }
 
it_behaves_like 'a tracked event', "enabled_issue_auto_creation_on_alerts", {}
it_behaves_like 'a tracked event', "enabled_issue_auto_creation_on_alerts"
end
end
 
Loading
Loading
Loading
Loading
@@ -32,7 +32,7 @@ def self.search(query, **options)
it 'delegates to the search method' do
expect(model)
.to receive(:search)
.with('foo', {})
.with('foo')
.and_call_original
 
expect(model.optionally_search('foo')).to eq(['foo', {}])
Loading
Loading
Loading
Loading
@@ -310,7 +310,7 @@
it 'properly removes tag' do
expect(service).to receive(:execute).with(root_repository) { { status: :success } }
expect(Projects::ContainerRepository::DeleteTagsService).to receive(:new).with(root_repository.project, api_user, tags: %w[rootA]) { service }
expect(Gitlab::Tracking).to receive(:event).with(described_class.name, 'delete_tag', {})
expect(Gitlab::Tracking).to receive(:event).with(described_class.name, 'delete_tag')
 
subject
 
Loading
Loading
@@ -326,7 +326,7 @@
it 'properly removes tag' do
expect(service).to receive(:execute).with(root_repository) { { status: :success } }
expect(Projects::ContainerRepository::DeleteTagsService).to receive(:new).with(root_repository.project, api_user, tags: %w[rootA]) { service }
expect(Gitlab::Tracking).to receive(:event).with(described_class.name, 'delete_tag', {})
expect(Gitlab::Tracking).to receive(:event).with(described_class.name, 'delete_tag')
 
subject
 
Loading
Loading
Loading
Loading
@@ -15,7 +15,7 @@ def index
end
 
it 'tracks the action name' do
expect(Gitlab::Tracking).to receive(:event).with('AnonymousController', 'index', {})
expect(Gitlab::Tracking).to receive(:event).with('AnonymousController', 'index')
get :index
end
end
Loading
Loading
Loading
Loading
@@ -129,7 +129,7 @@
 
RSpec.shared_examples 'a package tracking event' do |category, action|
it "creates a gitlab tracking event #{action}" do
expect(Gitlab::Tracking).to receive(:event).with(category, action, {})
expect(Gitlab::Tracking).to receive(:event).with(category, action)
 
expect { subject }.to change { Packages::Event.count }.by(1)
end
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
RSpec.shared_examples 'a gitlab tracking event' do |category, action|
it "creates a gitlab tracking event #{action}" do
expect(Gitlab::Tracking).to receive(:event).with(category, action, {})
expect(Gitlab::Tracking).to receive(:event).with(category, action)
 
subject
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment