2021-09-23 12:11:29 +00:00
|
|
|
# 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
|
2022-02-04 15:15:34 +00:00
|
|
|
|
|
|
|
describe '#owners' do
|
|
|
|
let(:owner) { build(:user) }
|
|
|
|
let(:namespace) { build(:namespace, owner: owner) }
|
|
|
|
|
|
|
|
specify do
|
|
|
|
expect(namespace.owners).to match_array([owner])
|
|
|
|
end
|
|
|
|
end
|
2021-09-23 12:11:29 +00:00
|
|
|
end
|