diff options
author | Izaak Alpert <ialpert@blackberry.com> | 2013-09-16 21:31:22 +0400 |
---|---|---|
committer | Izaak Alpert <ialpert@blackberry.com> | 2013-09-22 09:05:14 +0400 |
commit | 51e6095dd16a02c67966cea5de51a2c2ec81d9d6 (patch) | |
tree | 68c4bb07004ba803e510fa4fd8566c5b9f55a320 /spec/models/user_spec.rb | |
parent | 5367e42bd663cd8a66b364a2ce08c22a83800feb (diff) |
Make users theme configurable
GITLAB-1262
Change-Id: I690cb8ea294df53ebe8405a519c23c501af2c21a
Conflicts:
app/models/user.rb
config/initializers/1_settings.rb
spec/models/user_spec.rb
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r-- | spec/models/user_spec.rb | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 79915daa463..2b42226ecaf 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -221,9 +221,9 @@ describe User do let(:user) { User.build_user({}, as: :admin) } it "should apply defaults to user" do - user.projects_limit.should == 42 - user.can_create_group.should be_false - user.theme_id.should == Gitlab::Theme::MARS + user.projects_limit.should == Gitlab.config.gitlab.default_projects_limit + user.can_create_group.should == Gitlab.config.gitlab.default_can_create_group + user.theme_id.should == Gitlab.config.gitlab.default_theme end end @@ -231,6 +231,9 @@ describe User do let(:user) { User.build_user({projects_limit: 123, can_create_group: true, can_create_team: true, theme_id: Gitlab::Theme::BASIC}, as: :admin) } it "should apply defaults to user" do + Gitlab.config.gitlab.default_projects_limit.should_not == 123 + Gitlab.config.gitlab.default_can_create_group.should_not be_true + Gitlab.config.gitlab.default_theme.should_not == Gitlab::Theme::MARS user.projects_limit.should == 123 user.can_create_group.should be_true user.theme_id.should == Gitlab::Theme::BASIC @@ -243,9 +246,9 @@ describe User do let(:user) { User.build_user } it "should apply defaults to user" do - user.projects_limit.should == 42 - user.can_create_group.should be_false - user.theme_id.should == Gitlab::Theme::MARS + user.projects_limit.should == Gitlab.config.gitlab.default_projects_limit + user.can_create_group.should == Gitlab.config.gitlab.default_can_create_group + user.theme_id.should == Gitlab.config.gitlab.default_theme end end @@ -253,9 +256,9 @@ describe User do let(:user) { User.build_user(projects_limit: 123, can_create_group: true, theme_id: Gitlab::Theme::BASIC) } it "should apply defaults to user" do - user.projects_limit.should == 42 - user.can_create_group.should be_false - user.theme_id.should == Gitlab::Theme::MARS + user.projects_limit.should == Gitlab.config.gitlab.default_projects_limit + user.can_create_group.should == Gitlab.config.gitlab.default_can_create_group + user.theme_id.should == Gitlab.config.gitlab.default_theme end end end |