summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorMario de la Ossa <mdelaossa@gitlab.com>2018-02-02 18:39:55 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-02-02 18:39:55 +0000
commiteaada9d7066a20b5af815f723e09cde60a5c8c10 (patch)
tree72ba4231e28f1c5e5405db21e0611a55e6428145 /spec/models
parent8fa2932dc5cc7687e7d85ae7b00c07fd9bcc24a4 (diff)
downloadgitlab-ce-eaada9d7066a20b5af815f723e09cde60a5c8c10.tar.gz
use Gitlab::UserSettings directly as a singleton instead of including/extending it
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/key_spec.rb7
-rw-r--r--spec/models/note_spec.rb2
-rw-r--r--spec/models/project_spec.rb1
-rw-r--r--spec/models/user_spec.rb6
4 files changed, 2 insertions, 14 deletions
diff --git a/spec/models/key_spec.rb b/spec/models/key_spec.rb
index 4cd9e3f4f1d..7398fd25aa8 100644
--- a/spec/models/key_spec.rb
+++ b/spec/models/key_spec.rb
@@ -1,13 +1,6 @@
require 'spec_helper'
describe Key, :mailer do
- include Gitlab::CurrentSettings
-
- describe 'modules' do
- subject { described_class }
- it { is_expected.to include_module(Gitlab::CurrentSettings) }
- end
-
describe "Associations" do
it { is_expected.to belong_to(:user) }
end
diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb
index 3d030927036..00dda7c9c60 100644
--- a/spec/models/note_spec.rb
+++ b/spec/models/note_spec.rb
@@ -17,8 +17,6 @@ describe Note do
it { is_expected.to include_module(Participable) }
it { is_expected.to include_module(Mentionable) }
it { is_expected.to include_module(Awardable) }
-
- it { is_expected.to include_module(Gitlab::CurrentSettings) }
end
describe 'validation' do
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 31dcb543cbd..df4c796c61e 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -117,7 +117,6 @@ describe Project do
it { is_expected.to include_module(Gitlab::ConfigHelper) }
it { is_expected.to include_module(Gitlab::ShellAdapter) }
it { is_expected.to include_module(Gitlab::VisibilityLevel) }
- it { is_expected.to include_module(Gitlab::CurrentSettings) }
it { is_expected.to include_module(Referable) }
it { is_expected.to include_module(Sortable) }
end
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 594f23718da..18c91d4cffd 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -1,14 +1,12 @@
require 'spec_helper'
describe User do
- include Gitlab::CurrentSettings
include ProjectForksHelper
describe 'modules' do
subject { described_class }
it { is_expected.to include_module(Gitlab::ConfigHelper) }
- it { is_expected.to include_module(Gitlab::CurrentSettings) }
it { is_expected.to include_module(Referable) }
it { is_expected.to include_module(Sortable) }
it { is_expected.to include_module(TokenAuthenticatable) }
@@ -560,7 +558,7 @@ describe User do
stub_config_setting(default_can_create_group: true)
expect { user.update_attributes(external: false) }.to change { user.can_create_group }.to(true)
- .and change { user.projects_limit }.to(current_application_settings.default_projects_limit)
+ .and change { user.projects_limit }.to(Gitlab::CurrentSettings.default_projects_limit)
end
end
@@ -826,7 +824,7 @@ describe User do
end
end
- context 'when current_application_settings.user_default_external is true' do
+ context 'when Gitlab::CurrentSettings.user_default_external is true' do
before do
stub_application_setting(user_default_external: true)
end