mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-11 21:56:19 +10:00
In 8278b763d9 the default behaviour of annotation
has changes, which was causing a lot of noise in diffs. We decided in #17382
that it is better to get rid of the whole annotate gem, and instead let people
look at schema.rb for the columns in a table.
Fixes: #17382
27 lines
659 B
Ruby
27 lines
659 B
Ruby
require 'spec_helper'
|
|
|
|
RSpec.describe Identity, models: true do
|
|
|
|
describe 'relations' do
|
|
it { is_expected.to belong_to(:user) }
|
|
end
|
|
|
|
describe 'fields' do
|
|
it { is_expected.to respond_to(:provider) }
|
|
it { is_expected.to respond_to(:extern_uid) }
|
|
end
|
|
|
|
describe '#is_ldap?' do
|
|
let(:ldap_identity) { create(:identity, provider: 'ldapmain') }
|
|
let(:other_identity) { create(:identity, provider: 'twitter') }
|
|
|
|
it 'returns true if it is a ldap identity' do
|
|
expect(ldap_identity.ldap?).to be_truthy
|
|
end
|
|
|
|
it 'returns false if it is not a ldap identity' do
|
|
expect(other_identity.ldap?).to be_falsey
|
|
end
|
|
end
|
|
end
|