Welcome to mirror list, hosted at ThFree Co, Russian Federation.

contribution_event_expired_spec.js « contribution_event « components « contribution_events « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c58fca1ad121e58cceb9be0776d095b7e8081406 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import ContributionEventExpired from '~/contribution_events/components/contribution_event/contribution_event_expired.vue';
import ContributionEventBase from '~/contribution_events/components/contribution_event/contribution_event_base.vue';
import { eventExpired } from '../../utils';

const defaultPropsData = {
  event: eventExpired(),
};

describe('ContributionEventExpired', () => {
  let wrapper;

  const createComponent = () => {
    wrapper = shallowMountExtended(ContributionEventExpired, {
      propsData: defaultPropsData,
    });
  };

  beforeEach(() => {
    createComponent();
  });

  it('renders `ContributionEventBase`', () => {
    expect(wrapper.findComponent(ContributionEventBase).props()).toMatchObject({
      event: defaultPropsData.event,
      iconName: 'expire',
      message: ContributionEventExpired.i18n.message,
    });
  });
});