ed17adfbcd
This outdated gem was the cause of those annoying MiniTest errors. Also updates one use of `ensure_inclusion_of` which was deprecated in favor of `validate_inclusion_of`.
20 lines
511 B
Ruby
20 lines
511 B
Ruby
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
|