summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-10 10:20:22 +0100
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-10 10:20:22 +0100
commit354b69dde2ba399a4269a0f544fd7a4e399d8b7e (patch)
treeb44fb02b7c44cdf2fd30df907e22ad180240b873 /spec/models
parent2ee3f8381bd498cae52cbc0fbeb656ceae5cde9e (diff)
parentb7619dad52504f8fc61bfb3b42e7f8bcc42dc06d (diff)
downloadgitlab-ce-354b69dde2ba399a4269a0f544fd7a4e399d8b7e.tar.gz
Merge remote-tracking branch 'origin/release-notes'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/release_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/models/release_spec.rb b/spec/models/release_spec.rb
new file mode 100644
index 00000000000..527005b2b69
--- /dev/null
+++ b/spec/models/release_spec.rb
@@ -0,0 +1,16 @@
+require 'rails_helper'
+
+RSpec.describe Release, type: :model do
+ let(:release) { create(:release) }
+
+ it { expect(release).to be_valid }
+
+ describe 'associations' do
+ it { is_expected.to belong_to(:project) }
+ end
+
+ describe 'validation' do
+ it { is_expected.to validate_presence_of(:project) }
+ it { is_expected.to validate_presence_of(:description) }
+ end
+end