diff options
Diffstat (limited to 'spec/serializers/jira_connect/group_entity_spec.rb')
-rw-r--r-- | spec/serializers/jira_connect/group_entity_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/serializers/jira_connect/group_entity_spec.rb b/spec/serializers/jira_connect/group_entity_spec.rb new file mode 100644 index 00000000000..ade5ae89c52 --- /dev/null +++ b/spec/serializers/jira_connect/group_entity_spec.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe JiraConnect::GroupEntity do + subject do + described_class.new(subscription.namespace).as_json + end + + let(:subscription) { create(:jira_connect_subscription) } + + it 'contains all necessary elements of the group', :aggregate_failures do + expect(subject[:name]).to eq(subscription.namespace.name) + expect(subject[:avatar_url]).to eq(subscription.namespace.avatar_url) + expect(subject[:full_name]).to eq(subscription.namespace.full_name) + expect(subject[:description]).to eq(subscription.namespace.description) + end +end |