blob: fb9e75716667fddcca5635a0985584a27edffb12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# frozen_string_literal: true
require 'spec_helper'
# Main user namespace functionality it still in `Namespace`, so most
# of the specs are in `namespace_spec.rb`.
# UserNamespace specific specs will end up being migrated here.
RSpec.describe Namespaces::UserNamespace, type: :model do
describe 'validations' do
it { is_expected.to validate_presence_of(:owner) }
end
describe '#owners' do
let(:owner) { build(:user) }
let(:namespace) { build(:namespace, owner: owner) }
specify do
expect(namespace.owners).to match_array([owner])
end
end
end
|