Skip to content
Snippets Groups Projects
Commit a89cb5cb authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 0d6fa033
No related branches found
No related tags found
No related merge requests found
Showing
with 30 additions and 30 deletions
Loading
Loading
@@ -30,7 +30,7 @@ describe Gitlab::Sanitizers::Exif do
end
 
it 'processes only uploads created since specified date' do
expect(sanitizer).to receive(:clean).exactly(2).times
expect(sanitizer).to receive(:clean).twice
 
sanitizer.batch_clean(since: 2.days.ago)
end
Loading
Loading
Loading
Loading
@@ -6,7 +6,7 @@ describe OmniAuth::Strategies::Jwt do
include Rack::Test::Methods
include DeviseHelpers
 
context '#decoded' do
describe '#decoded' do
subject { described_class.new({}) }
 
let(:timestamp) { Time.now.to_i }
Loading
Loading
Loading
Loading
@@ -25,13 +25,13 @@ describe SafeZip::Entry do
FileUtils.remove_entry_secure(target_path)
end
 
context '#path_dir' do
describe '#path_dir' do
subject { entry.path_dir }
 
it { is_expected.to eq(target_path + '/public/folder') }
end
 
context '#exist?' do
describe '#exist?' do
subject { entry.exist? }
 
context 'when entry does not exist' do
Loading
Loading
Loading
Loading
@@ -12,7 +12,7 @@ describe SafeZip::Extract do
FileUtils.remove_entry_secure(target_path)
end
 
context '#extract' do
describe '#extract' do
subject { object.extract(directories: directories, to: target_path) }
 
shared_examples 'extracts archive' do |param|
Loading
Loading
Loading
Loading
@@ -81,13 +81,13 @@ describe Badge do
let(:badge) { build(:badge, link_url: placeholder_url, image_url: placeholder_url) }
let!(:project) { create(:project) }
 
context '#rendered_link_url' do
describe '#rendered_link_url' do
let(:method) { :link_url }
 
it_behaves_like 'rendered_links'
end
 
context '#rendered_image_url' do
describe '#rendered_image_url' do
let(:method) { :image_url }
 
it_behaves_like 'rendered_links'
Loading
Loading
Loading
Loading
@@ -30,13 +30,13 @@ describe ProjectBadge do
let(:badge) { build(:project_badge, link_url: placeholder_url, image_url: placeholder_url) }
let!(:project) { badge.project }
 
context '#rendered_link_url' do
describe '#rendered_link_url' do
let(:method) { :link_url }
 
it_behaves_like 'rendered_links'
end
 
context '#rendered_image_url' do
describe '#rendered_image_url' do
let(:method) { :image_url }
 
it_behaves_like 'rendered_links'
Loading
Loading
Loading
Loading
@@ -51,7 +51,7 @@ describe Ci::ArtifactBlob do
allow(Gitlab.config.pages).to receive(:artifacts_server).and_return(true)
end
 
context '.gif extension' do
describe '.gif extension' do
it 'returns nil' do
expect(subject.external_url(build.project, build)).to be_nil
end
Loading
Loading
Loading
Loading
@@ -11,7 +11,7 @@ describe Ci::PersistentRef do
pipeline.succeed!
end
 
context '#exist?' do
describe '#exist?' do
subject { pipeline.persistent_ref.exist? }
 
let(:pipeline) { create(:ci_pipeline, sha: sha, project: project) }
Loading
Loading
@@ -31,7 +31,7 @@ describe Ci::PersistentRef do
end
end
 
context '#create' do
describe '#create' do
subject { pipeline.persistent_ref.create }
 
let(:pipeline) { create(:ci_pipeline, sha: sha, project: project) }
Loading
Loading
@@ -81,7 +81,7 @@ describe Ci::PersistentRef do
end
end
 
context '#delete' do
describe '#delete' do
subject { pipeline.persistent_ref.delete }
 
let(:pipeline) { create(:ci_pipeline, sha: sha, project: project) }
Loading
Loading
Loading
Loading
@@ -25,7 +25,7 @@ describe Ci::Runner do
end
end
 
context '#exactly_one_group' do
describe '#exactly_one_group' do
let(:group) { create(:group) }
let(:runner) { create(:ci_runner, :group, groups: [group]) }
 
Loading
Loading
Loading
Loading
@@ -48,14 +48,14 @@ describe Avatarable do
end
 
it 'calls local_url twice for path and URLs' do
expect(project.avatar).to receive(:local_url).exactly(2).times.and_call_original
expect(project.avatar).to receive(:local_url).twice.and_call_original
 
expect(project.avatar_path(only_path: true)).to eq(avatar_path)
expect(project.avatar_path(only_path: false)).to eq(avatar_url)
end
 
it 'calls local_url twice for different sizes' do
expect(project.avatar).to receive(:local_url).exactly(2).times.and_call_original
expect(project.avatar).to receive(:local_url).twice.and_call_original
 
expect(project.avatar_path).to eq(avatar_path)
expect(project.avatar_path(size: 40)).to eq(avatar_path + "?width=40")
Loading
Loading
@@ -64,7 +64,7 @@ describe Avatarable do
it 'handles unpersisted objects' do
new_project = build(:project, :with_avatar)
path = [relative_url_root, new_project.avatar.local_url].join
expect(new_project.avatar).to receive(:local_url).exactly(2).times.and_call_original
expect(new_project.avatar).to receive(:local_url).twice.and_call_original
 
2.times do
expect(new_project.avatar_path).to eq(path)
Loading
Loading
Loading
Loading
@@ -58,7 +58,7 @@ describe Group, 'Routable' do
end
end
 
context '.find_by_full_path' do
describe '.find_by_full_path' do
let!(:nested_group) { create(:group, parent: group) }
 
context 'without any redirect routes' do
Loading
Loading
Loading
Loading
@@ -49,7 +49,7 @@ RSpec.describe TriggerableHooks do
TestableHook.create!(url: 'http://example2.com', push_events: true)
filter1 = double(:filter1)
filter2 = double(:filter2)
allow(ActiveHookFilter).to receive(:new).exactly(2).times.and_return(filter1, filter2)
allow(ActiveHookFilter).to receive(:new).twice.and_return(filter1, filter2)
expect(filter1).to receive(:matches?).and_return(true)
expect(filter2).to receive(:matches?).and_return(false)
 
Loading
Loading
Loading
Loading
@@ -87,7 +87,7 @@ describe DeploymentMetrics do
expect(prometheus_adapter).to receive(:query).with(:deployment, deployment).and_return(simple_metrics)
end
 
it { is_expected.to eq(simple_metrics.merge({ deployment_time: deployment.created_at.to_i })) }
it { is_expected.to eq(simple_metrics.merge({ deployment_time: deployment.finished_at.to_i })) }
end
end
 
Loading
Loading
Loading
Loading
@@ -495,7 +495,7 @@ describe Deployment do
end
end
 
context '#update_status' do
describe '#update_status' do
let(:deploy) { create(:deployment, status: :running) }
 
it 'changes the status' do
Loading
Loading
Loading
Loading
@@ -359,7 +359,7 @@ describe Issue do
allow(subject.project).to receive(:repository).and_return(repository)
end
 
context '#to_branch_name does not exists' do
describe '#to_branch_name does not exists' do
before do
allow(repository).to receive(:branch_exists?).and_return(false)
end
Loading
Loading
@@ -369,7 +369,7 @@ describe Issue do
end
end
 
context '#to_branch_name exists not ending with -index' do
describe '#to_branch_name exists not ending with -index' do
before do
allow(repository).to receive(:branch_exists?).and_return(true)
allow(repository).to receive(:branch_exists?).with(/#{subject.to_branch_name}-\d/).and_return(false)
Loading
Loading
@@ -380,7 +380,7 @@ describe Issue do
end
end
 
context '#to_branch_name exists ending with -index' do
describe '#to_branch_name exists ending with -index' do
before do
allow(repository).to receive(:branch_exists?).and_return(true)
allow(repository).to receive(:branch_exists?).with("#{subject.to_branch_name}-3").and_return(false)
Loading
Loading
Loading
Loading
@@ -80,7 +80,7 @@ describe NotificationRecipient do
end
end
 
context '#notification_setting' do
describe '#notification_setting' do
context 'for child groups' do
let!(:moved_group) { create(:group) }
let(:group) { create(:group) }
Loading
Loading
Loading
Loading
@@ -148,7 +148,7 @@ describe BambooService, :use_clean_rails_memory_store_caching do
end
 
shared_examples 'reactive cache calculation' do
context '#build_page' do
describe '#build_page' do
subject { service.calculate_reactive_cache('123', 'unused')[:build_page] }
 
it 'returns a specific URL when status is 500' do
Loading
Loading
@@ -180,7 +180,7 @@ describe BambooService, :use_clean_rails_memory_store_caching do
end
end
 
context '#commit_status' do
describe '#commit_status' do
subject { service.calculate_reactive_cache('123', 'unused')[:commit_status] }
 
it 'sets commit status to :error when status is 500' do
Loading
Loading
Loading
Loading
@@ -83,7 +83,7 @@ describe BuildkiteService, :use_clean_rails_memory_store_caching do
end
 
describe '#calculate_reactive_cache' do
context '#commit_status' do
describe '#commit_status' do
subject { service.calculate_reactive_cache('123', 'unused')[:commit_status] }
 
it 'sets commit status to :error when status is 500' do
Loading
Loading
Loading
Loading
@@ -31,7 +31,7 @@ describe ChatMessage::IssueMessage do
context 'without markdown' do
let(:color) { '#C95823' }
 
context '#initialize' do
describe '#initialize' do
before do
args[:object_attributes][:description] = nil
end
Loading
Loading
Loading
Loading
@@ -86,7 +86,7 @@ describe DroneCiService, :use_clean_rails_memory_store_caching do
describe '#calculate_reactive_cache' do
include_context :drone_ci_service
 
context '#commit_status' do
describe '#commit_status' do
subject { drone.calculate_reactive_cache(sha, branch)[:commit_status] }
 
it 'sets commit status to :error when status is 500' do
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