debian-mirror-gitlab/spec/serializers/jira_connect/subscription_entity_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
700 B
Ruby
Raw Normal View History

2021-10-27 15:23:28 +05:30
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe JiraConnect::SubscriptionEntity do
subject do
described_class.new(subscription).as_json
end
let(:subscription) { create(:jira_connect_subscription) }
it 'contains all necessary elements of the subscription', :aggregate_failures do
expect(subject).to include(:created_at)
expect(subject[:unlink_path]).to eq("/-/jira_connect/subscriptions/#{subscription.id}")
expect(subject[:group]).to eq(
name: subscription.namespace.name,
avatar_url: subscription.namespace.avatar_url,
full_name: subscription.namespace.full_name,
description: subscription.namespace.description
)
end
end