diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-10-02 14:39:58 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-10-02 14:39:58 +0000 |
commit | 0e7b96bf4854f5113bd208ee400e68d9fba09ad8 (patch) | |
tree | 503859aa42501ca05c50cfffbe7801a7bbfbecc3 /spec | |
parent | 93522e59eccd8fd5801f313b34fec6a4f6394d9a (diff) | |
parent | 97e6c9b42ca65be14f64f1528821922b2b0bd04a (diff) | |
download | gitlab-ce-0e7b96bf4854f5113bd208ee400e68d9fba09ad8.tar.gz |
Merge branch 'access_level_badge_bug' into 'master'
Fix: Wrong access level badge on MR comments
https://gitlab.com/gitlab-org/gitlab-ce/issues/2654
See merge request !1501
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/project_team_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/models/project_team_spec.rb b/spec/models/project_team_spec.rb index cc1138490a0..26e8fdae472 100644 --- a/spec/models/project_team_spec.rb +++ b/spec/models/project_team_spec.rb @@ -66,4 +66,16 @@ describe ProjectTeam do it { expect(project.team.member?(guest)).to be_truthy } end end + + describe "#human_max_access" do + it "return master role" do + user = create :user + group = create :group + group.add_users([user.id], GroupMember::MASTER) + project = create(:project, namespace: group) + project.team << [user, :guest] + + expect(project.team.human_max_access(user.id)).to eq("Master") + end + end end |