Commit e22d200a authored by Mark Chao's avatar Mark Chao Committed by Dmitriy Zaporozhets
Browse files

Resolve "Rename the `Master` role to `Maintainer`" Backend

parent 2649cbe0cb26
......@@ -6,7 +6,7 @@
before do
sign_in(user)
project.add_master(user)
project.add_maintainer(user)
controller.instance_variable_set(:@project, project)
end
......
......@@ -6,7 +6,7 @@
let(:user) { create(:user) }
before do
project.add_master(user)
project.add_maintainer(user)
sign_in(user)
end
......
......@@ -7,7 +7,7 @@
before do
sign_in(user)
project.add_master(user)
project.add_maintainer(user)
controller.instance_variable_set(:@project, project)
end
......
......@@ -108,7 +108,7 @@ def do_get(opts = {})
end
before do
project.add_master(user)
project.add_maintainer(user)
sign_in(user)
end
......@@ -230,12 +230,12 @@ def do_get(opts = {})
end
end
context 'as master' do
let(:master) { create(:user) }
context 'as maintainer' do
let(:maintainer) { create(:user) }
before do
project.add_master(master)
sign_in(master)
project.add_maintainer(maintainer)
sign_in(maintainer)
get :edit, default_params
end
......@@ -263,7 +263,7 @@ def blob_after_edit_path
end
before do
project.add_master(user)
project.add_maintainer(user)
sign_in(user)
end
......
......@@ -5,7 +5,7 @@
let(:user) { create(:user) }
before do
project.add_master(user)
project.add_maintainer(user)
sign_in(user)
end
......
......@@ -6,7 +6,7 @@
let(:developer) { create(:user) }
before do
project.add_master(user)
project.add_maintainer(user)
project.add_developer(user)
allow(project).to receive(:branches).and_return(['master', 'foo/bar/baz'])
......
......@@ -17,7 +17,7 @@ def current_application
let(:user) { create(:user) }
before do
project.add_master(user)
project.add_maintainer(user)
sign_in(user)
end
......@@ -70,7 +70,7 @@ def current_application
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
it { expect { go }.to be_allowed_for(:master).of(project) }
it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_denied_for(:developer).of(project) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
......
......@@ -11,7 +11,7 @@
let(:user) { create(:user) }
before do
project.add_master(user)
project.add_maintainer(user)
sign_in(user)
end
......@@ -61,7 +61,7 @@
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
it { expect { go }.to be_allowed_for(:master).of(project) }
it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_denied_for(:developer).of(project) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
......@@ -79,7 +79,7 @@ def go
let(:user) { create(:user) }
before do
project.add_master(user)
project.add_maintainer(user)
sign_in(user)
end
......@@ -142,7 +142,7 @@ def go
let(:user) { create(:user) }
before do
project.add_master(user)
project.add_maintainer(user)
sign_in(user)
end
......@@ -156,7 +156,7 @@ def go
describe 'security' do
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
it { expect { go }.to be_allowed_for(:master).of(project) }
it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_denied_for(:developer).of(project) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
......@@ -185,7 +185,7 @@ def go
let(:user) { create(:user) }
before do
project.add_master(user)
project.add_maintainer(user)
sign_in(user)
end
......@@ -236,7 +236,7 @@ def go
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
it { expect { go }.to be_allowed_for(:master).of(project) }
it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_denied_for(:developer).of(project) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
......@@ -267,7 +267,7 @@ def go
let(:user) { create(:user) }
before do
project.add_master(user)
project.add_maintainer(user)
sign_in(user)
end
......@@ -286,7 +286,7 @@ def go
describe 'security' do
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
it { expect { go }.to be_allowed_for(:master).of(project) }
it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_denied_for(:developer).of(project) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
......@@ -306,7 +306,7 @@ def go
let(:user) { create(:user) }
before do
project.add_master(user)
project.add_maintainer(user)
sign_in(user)
end
......@@ -327,7 +327,7 @@ def go
describe 'security' do
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
it { expect { go }.to be_allowed_for(:master).of(project) }
it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_denied_for(:developer).of(project) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
......@@ -350,7 +350,7 @@ def go
let(:user) { create(:user) }
before do
project.add_master(user)
project.add_maintainer(user)
sign_in(user)
end
......@@ -365,7 +365,7 @@ def go
describe 'security' do
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
it { expect { go }.to be_allowed_for(:master).of(project) }
it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_denied_for(:developer).of(project) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
......@@ -386,7 +386,7 @@ def go
let(:user) { create(:user) }
before do
project.add_master(user)
project.add_maintainer(user)
sign_in(user)
end
......@@ -437,7 +437,7 @@ def go
let(:user) { create(:user) }
before do
project.add_master(user)
project.add_maintainer(user)
sign_in(user)
end
......@@ -525,7 +525,7 @@ def go
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
it { expect { go }.to be_allowed_for(:master).of(project) }
it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_denied_for(:developer).of(project) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
......@@ -552,7 +552,7 @@ def go_json
let(:user) { create(:user) }
before do
project.add_master(user)
project.add_maintainer(user)
sign_in(user)
end
......@@ -605,7 +605,7 @@ def go_json
it { expect { go }.to be_allowed_for(:admin) }
it { expect { go }.to be_allowed_for(:owner).of(project) }
it { expect { go }.to be_allowed_for(:master).of(project) }
it { expect { go }.to be_allowed_for(:maintainer).of(project) }
it { expect { go }.to be_denied_for(:developer).of(project) }
it { expect { go }.to be_denied_for(:reporter).of(project) }
it { expect { go }.to be_denied_for(:guest).of(project) }
......
......@@ -9,7 +9,7 @@
before do
sign_in(user)
project.add_master(user)
project.add_maintainer(user)
end
describe 'GET show' do
......
......@@ -6,7 +6,7 @@
before do
sign_in(user)
project.add_master(user)
project.add_maintainer(user)
end
describe "GET show" do
......
......@@ -6,7 +6,7 @@
before do
sign_in(user)
project.add_master(user)
project.add_maintainer(user)
end
describe 'GET index' do
......
......@@ -6,7 +6,7 @@
before do
sign_in(user)
project.add_master(user)
project.add_maintainer(user)
end
describe 'cycle analytics not set up flag' do
......
......@@ -5,7 +5,7 @@
let(:user) { create(:user) }
before do
project.add_master(user)
project.add_maintainer(user)
sign_in(user)
end
......
......@@ -8,7 +8,7 @@
let(:environment) { create(:environment, name: 'production', project: project) }
before do
project.add_master(user)
project.add_maintainer(user)
sign_in(user)
end
......
......@@ -9,7 +9,7 @@
end
before do
project.add_master(user)
project.add_maintainer(user)
sign_in(user)
end
......
......@@ -7,7 +7,7 @@
before do
sign_in(user)
project.add_master(user)
project.add_maintainer(user)
controller.instance_variable_set(:@project, project)
end
......
......@@ -6,7 +6,7 @@
before do
sign_in(user)
project.add_master(user)
project.add_maintainer(user)
end
describe 'GET languages' do
......
......@@ -7,7 +7,7 @@
let(:user) { create(:user) }
before do
project.add_master(user)
project.add_maintainer(user)
sign_in(user)
end
......
......@@ -5,7 +5,7 @@
let(:user) { create(:user) }
before do
project.add_master(user)
project.add_maintainer(user)
sign_in(user)
end
......
......@@ -6,7 +6,7 @@
before do
sign_in(user)
project.add_master(user)
project.add_maintainer(user)
end
describe 'GET #show' do
......
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