Commit 8e6b362f authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents bfb47d74 c69fbef0
......@@ -52,7 +52,11 @@ class Projects::ProtectedEnvironmentsController < Projects::ApplicationControlle
end
def protected_environment_params
params.require(:protected_environment).permit(:name, deploy_access_levels_attributes: deploy_access_level_attributes)
params.require(:protected_environment).permit(
:name,
:required_approval_count,
deploy_access_levels_attributes: deploy_access_level_attributes
)
end
def deploy_access_level_attributes
......
......@@ -13,7 +13,8 @@ RSpec.describe Projects::ProtectedEnvironmentsController do
describe '#POST create' do
let(:params) do
attributes_for(:protected_environment,
deploy_access_levels_attributes: [{ access_level: maintainer_access }])
deploy_access_levels_attributes: [{ access_level: maintainer_access }],
required_approval_count: 1)
end
subject do
......@@ -93,7 +94,8 @@ RSpec.describe Projects::ProtectedEnvironmentsController do
deploy_access_levels_attributes: [
{ id: deploy_access_level.id, access_level: Gitlab::Access::DEVELOPER },
{ access_level: maintainer_access }
]
],
required_approval_count: 3
}
end
......@@ -118,8 +120,9 @@ RSpec.describe Projects::ProtectedEnvironmentsController do
expect(assigns(:protected_environment)).to eq(protected_environment)
end
it 'updates the protected environment' do
it 'updates the protected environment', :aggregate_failures do
expect(protected_environment.deploy_access_levels.count).to eq(2)
expect(protected_environment.reload.required_approval_count).to eq(3)
end
it 'is successful' do
......
......@@ -177,7 +177,7 @@ module Gitlab
end
def from_address
mail.from.first || mail.sender
(mail.reply_to || []).first || mail.from.first || mail.sender
end
def can_handle_legacy_format?
......
......@@ -49,7 +49,7 @@ RSpec.describe 'User interacts with awards' do
end
end
it 'toggles a custom award emoji' do
it 'toggles a custom award emoji', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/351878' do
page.within('.awards') do
page.find('.add-reaction-button').click
end
......
Delivered-To: incoming+email-test-project_id-issue-@appmail.adventuretime.ooo
Return-Path: <jake@adventuretime.ooo>
Received: from iceking.adventuretime.ooo ([unix socket]) by iceking (Cyrus v2.2.13-Debian-2.2.13-19+squeeze3) with LMTPA; Thu, 13 Jun 2013 17:03:50 -0400
Received: from mail-ie0-x234.google.com (mail-ie0-x234.google.com [IPv6:2607:f8b0:4001:c03::234]) by iceking.adventuretime.ooo (8.14.3/8.14.3/Debian-9.4) with ESMTP id r5DL3nFJ016967 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for <incoming+gitlabhq/gitlabhq@appmail.adventuretime.ooo>; Thu, 13 Jun 2013 17:03:50 -0400
Received: by mail-ie0-f180.google.com with SMTP id f4so21977375iea.25 for <incoming+email-test-project_id-issue-@appmail.adventuretime.ooo>; Thu, 13 Jun 2013 14:03:48 -0700
Received: by 10.0.0.1 with HTTP; Thu, 13 Jun 2013 14:03:48 -0700
Date: Thu, 13 Jun 2013 17:03:48 -0400
From: Finn the Human <finn@adventuretime.ooo>
Reply-To: Finn the Hooman <hooman@adventuretime.ooo>
Sender: Jake the Dog <jake@adventuretime.ooo>
To: support@adventuretime.ooo
Delivered-To: support@adventuretime.ooo
Message-ID: <CADkmRc+rNGAGGbV2iE5p918UVy4UyJqVcXRO2=otppgzduJSg@mail.gmail.com>
Subject: The message subject! @all
Mime-Version: 1.0
Content-Type: text/plain;
charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Sieve: CMU Sieve 2.2
X-Received: by 10.0.0.1 with SMTP id n7mr11234144ipb.85.1371157428600; Thu,
13 Jun 2013 14:03:48 -0700 (PDT)
X-Scanned-By: MIMEDefang 2.69 on IPv6:2001:470:1d:165::1
Service desk stuff!
```
a = b
```
......@@ -478,20 +478,6 @@ RSpec.describe Gitlab::Email::Handler::ServiceDeskHandler do
end
end
context 'when there is a reply-to address, a sender address, and a from address' do
let(:email_raw) { email_fixture('emails/service_desk_reply_to_sender_and_from.eml') }
it 'ignores the reply-to and prefers the from address' do
setup_attachment
expect { receiver.execute }.to change { Issue.count }.by(1)
new_issue = Issue.last
expect(new_issue.external_author).to eq('finn@adventuretime.ooo')
end
end
context 'when service desk is not enabled for project' do
before do
allow(Gitlab::ServiceDesk).to receive(:enabled?).and_return(false)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment