blob: cea653ec285cafb867c9d5ff9cc68bce36369d07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
require 'spec_helper'
describe Member do
describe "Associations" do
it { should belong_to(:user) }
end
describe "Validation" do
subject { Member.new(access_level: Member::GUEST) }
it { should validate_presence_of(:user) }
it { should validate_presence_of(:source) }
it { should validate_inclusion_of(:access_level).in_array(Gitlab::Access.values) }
end
describe "Delegate methods" do
it { should respond_to(:user_name) }
it { should respond_to(:user_email) }
end
end
|