diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-03-07 17:20:22 +0300 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-03-07 17:20:22 +0300 |
commit | 7fb2d94e56e2e74ec00a5c221d9aaa494222a573 (patch) | |
tree | 93ad8a3816539c3723250904a3e7aac75f10bb6f /spec/models/chat_team_spec.rb | |
parent | df55d35ffd33fe97e669a227dd4666044e8cc65b (diff) |
Namespace can have only one chat team
Diffstat (limited to 'spec/models/chat_team_spec.rb')
-rw-r--r-- | spec/models/chat_team_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/models/chat_team_spec.rb b/spec/models/chat_team_spec.rb index 1aab161ec13..5283561a83f 100644 --- a/spec/models/chat_team_spec.rb +++ b/spec/models/chat_team_spec.rb @@ -1,9 +1,14 @@ require 'spec_helper' describe ChatTeam, type: :model do + subject { create(:chat_team) } + # Associations it { is_expected.to belong_to(:namespace) } + # Validations + it { is_expected.to validate_uniqueness_of(:namespace) } + # Fields it { is_expected.to respond_to(:name) } it { is_expected.to respond_to(:team_id) } |