diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-31 15:40:27 -0200 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-11-17 15:10:12 -0200 |
commit | 4fcae04f7bb4823d740a18419f21b8d154b4ef89 (patch) | |
tree | 48bc20ed1e63a2faae77754ed602a4aa2b2e1ffe /spec/models/subscription_spec.rb | |
parent | 8762db3b8f5f45bb46de2d0fb0d8e4fd6bc04058 (diff) | |
download | gitlab-ce-4fcae04f7bb4823d740a18419f21b8d154b4ef89.tar.gz |
Add project_id to subscriptions
Diffstat (limited to 'spec/models/subscription_spec.rb')
-rw-r--r-- | spec/models/subscription_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/models/subscription_spec.rb b/spec/models/subscription_spec.rb new file mode 100644 index 00000000000..6cd6e01d0c7 --- /dev/null +++ b/spec/models/subscription_spec.rb @@ -0,0 +1,15 @@ +require 'spec_helper' + +describe Subscription, models: true do + describe 'relationships' do + it { is_expected.to belong_to(:project) } + it { is_expected.to belong_to(:subscribable) } + it { is_expected.to belong_to(:user) } + end + + describe 'validations' do + it { is_expected.to validate_presence_of(:project) } + it { is_expected.to validate_presence_of(:subscribable) } + it { is_expected.to validate_presence_of(:user) } + end +end |