diff options
Diffstat (limited to 'spec/models/projects')
-rw-r--r-- | spec/models/projects/wiki_repository_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/models/projects/wiki_repository_spec.rb b/spec/models/projects/wiki_repository_spec.rb new file mode 100644 index 00000000000..6868e1f5fb9 --- /dev/null +++ b/spec/models/projects/wiki_repository_spec.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Projects::WikiRepository do + subject { described_class.new(project: build(:project)) } + + describe 'associations' do + it { is_expected.to belong_to(:project).inverse_of(:wiki_repository) } + end + + describe 'validations' do + it { is_expected.to validate_presence_of(:project) } + it { is_expected.to validate_uniqueness_of(:project) } + end +end |