summaryrefslogtreecommitdiff
path: root/spec/views/groups/edit.html.haml_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/views/groups/edit.html.haml_spec.rb')
-rw-r--r--spec/views/groups/edit.html.haml_spec.rb34
1 files changed, 17 insertions, 17 deletions
diff --git a/spec/views/groups/edit.html.haml_spec.rb b/spec/views/groups/edit.html.haml_spec.rb
index 86bb28a43c1..38cfb84f0d5 100644
--- a/spec/views/groups/edit.html.haml_spec.rb
+++ b/spec/views/groups/edit.html.haml_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe 'groups/edit.html.haml' do
include Devise::Test::ControllerHelpers
- describe 'Share lock option' do
+ describe '"Share with group lock" setting' do
let(:root_owner) { create(:user) }
let(:root_group) { create(:group) }
@@ -11,7 +11,7 @@ describe 'groups/edit.html.haml' do
root_group.add_owner(root_owner)
end
- shared_examples_for 'share lock option' do |checkbox_options|
+ shared_examples_for '"Share with group lock" setting' do |checkbox_options|
it 'should have the correct label, help text, and checkbox options' do
assign(:group, test_group)
allow(view).to receive(:can?).with(test_user, :admin_group, test_group).and_return(true)
@@ -32,7 +32,7 @@ describe 'groups/edit.html.haml' do
let(:test_group) { root_group }
let(:test_user) { root_owner }
- it_behaves_like 'share lock option', { disabled: false, checked: false }
+ it_behaves_like '"Share with group lock" setting', { disabled: false, checked: false }
end
context 'for a subgroup', :nested_groups do
@@ -40,22 +40,22 @@ describe 'groups/edit.html.haml' do
let(:sub_owner) { create(:user) }
let(:test_group) { subgroup }
- context 'when the root_group has "Share lock" disabled' do
- context 'when the subgroup has "Share lock" disabled' do
+ context 'when the root_group has "Share with group lock" disabled' do
+ context 'when the subgroup has "Share with group lock" disabled' do
context 'as the root_owner' do
let(:test_user) { root_owner }
- it_behaves_like 'share lock option', { disabled: false, checked: false }
+ it_behaves_like '"Share with group lock" setting', { disabled: false, checked: false }
end
context 'as the sub_owner' do
let(:test_user) { sub_owner }
- it_behaves_like 'share lock option', { disabled: false, checked: false }
+ it_behaves_like '"Share with group lock" setting', { disabled: false, checked: false }
end
end
- context 'when the subgroup has "Share lock" enabled' do
+ context 'when the subgroup has "Share with group lock" enabled' do
before do
subgroup.update_column(:share_with_group_lock, true)
end
@@ -63,37 +63,37 @@ describe 'groups/edit.html.haml' do
context 'as the root_owner' do
let(:test_user) { root_owner }
- it_behaves_like 'share lock option', { disabled: false, checked: true }
+ it_behaves_like '"Share with group lock" setting', { disabled: false, checked: true }
end
context 'as the sub_owner' do
let(:test_user) { sub_owner }
- it_behaves_like 'share lock option', { disabled: false, checked: true }
+ it_behaves_like '"Share with group lock" setting', { disabled: false, checked: true }
end
end
end
- context 'when the root_group has "Share lock" enabled' do
+ context 'when the root_group has "Share with group lock" enabled' do
before do
root_group.update_column(:share_with_group_lock, true)
end
- context 'when the subgroup has "Share lock" disabled (parent overridden)' do
+ context 'when the subgroup has "Share with group lock" disabled (parent overridden)' do
context 'as the root_owner' do
let(:test_user) { root_owner }
- it_behaves_like 'share lock option', { disabled: false, checked: false }
+ it_behaves_like '"Share with group lock" setting', { disabled: false, checked: false }
end
context 'as the sub_owner' do
let(:test_user) { sub_owner }
- it_behaves_like 'share lock option', { disabled: false, checked: false }
+ it_behaves_like '"Share with group lock" setting', { disabled: false, checked: false }
end
end
- context 'when the subgroup has "Share lock" enabled (same as parent)' do
+ context 'when the subgroup has "Share with group lock" enabled (same as parent)' do
before do
subgroup.update_column(:share_with_group_lock, true)
end
@@ -101,13 +101,13 @@ describe 'groups/edit.html.haml' do
context 'as the root_owner' do
let(:test_user) { root_owner }
- it_behaves_like 'share lock option', { disabled: false, checked: true }
+ it_behaves_like '"Share with group lock" setting', { disabled: false, checked: true }
end
context 'as the sub_owner' do
let(:test_user) { sub_owner }
- it_behaves_like 'share lock option', { disabled: true, checked: true }
+ it_behaves_like '"Share with group lock" setting', { disabled: true, checked: true }
end
end
end