Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-09 00:21:00 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-09 00:21:00 +0300
commit939c046a9872c1d7c38d73dc08860681ecebd1f1 (patch)
tree084daaaf574146379744ca61550752bceffa6578 /spec
parentd0a50985ec613584821806062df4eaa39337449c (diff)
Fix feature and tests
Diffstat (limited to 'spec')
-rw-r--r--spec/helpers/application_helper_spec.rb2
-rw-r--r--spec/models/application_setting_spec.rb4
-rw-r--r--spec/requests/api/users_spec.rb4
3 files changed, 4 insertions, 6 deletions
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb
index 07dd33b211b..9cdbc846b19 100644
--- a/spec/helpers/application_helper_spec.rb
+++ b/spec/helpers/application_helper_spec.rb
@@ -87,7 +87,7 @@ describe ApplicationHelper do
let(:user_email) { 'user@email.com' }
it "should return a generic avatar path when Gravatar is disabled" do
- Gitlab.config.gravatar.stub(:enabled).and_return(false)
+ ApplicationSetting.any_instance.stub(gravatar_enabled?: false)
gravatar_icon(user_email).should match('no_avatar.png')
end
diff --git a/spec/models/application_setting_spec.rb b/spec/models/application_setting_spec.rb
index 3a8d52c11c4..039775dddda 100644
--- a/spec/models/application_setting_spec.rb
+++ b/spec/models/application_setting_spec.rb
@@ -1,7 +1,5 @@
require 'spec_helper'
describe ApplicationSetting, models: true do
- describe 'should exists on start' do
- it { ApplicationSetting.count.should_not be_zero }
- end
+ it { ApplicationSetting.create_from_defaults.should be_valid }
end
diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb
index 1ecc79ea7ef..dec488c6d00 100644
--- a/spec/requests/api/users_spec.rb
+++ b/spec/requests/api/users_spec.rb
@@ -186,7 +186,7 @@ describe API::API, api: true do
describe "GET /users/sign_up" do
context 'enabled' do
before do
- Gitlab.config.gitlab.stub(:signup_enabled).and_return(true)
+ ApplicationSetting.any_instance.stub(signup_enabled?: true)
end
it "should return sign up page if signup is enabled" do
@@ -197,7 +197,7 @@ describe API::API, api: true do
context 'disabled' do
before do
- Gitlab.config.gitlab.stub(:signup_enabled).and_return(false)
+ ApplicationSetting.any_instance.stub(signup_enabled?: false)
end
it "should redirect to sign in page if signup is disabled" do