diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-09-22 02:20:26 -0700 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-09-22 02:20:26 -0700 |
commit | 5bc07b2ad82492e8438f07363337bb5e80a22dfb (patch) | |
tree | a4465d59939f1b2268a98f945e046cbe52bec5d2 /spec | |
parent | 0d23ea294db936c7c9e4879cda75907b749eee54 (diff) | |
parent | fcba0d55f483248022ca6c85faf33c5b4202dd9a (diff) | |
download | gitlab-ce-5bc07b2ad82492e8438f07363337bb5e80a22dfb.tar.gz |
Merge pull request #5116 from karlhungus/feature-configurable-theme
Make users theme configurable
Diffstat (limited to 'spec')
-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 |