Commit d4789eae authored by Kev's avatar Kev

Remove newState from event as it's not needed

parent 86ba2909
......@@ -63,7 +63,7 @@ describe('Vulnerability', () => {
const findFooter = () => wrapper.find(Footer);
describe('default behavior', () => {
it('consits of header, details and footer', () => {
it('consists of header, details, and footer', () => {
expect(findHeader().exists()).toBe(true);
expect(findDetails().exists()).toBe(true);
expect(findFooter().exists()).toBe(true);
......@@ -111,17 +111,15 @@ describe('Vulnerability', () => {
findFooter().vm.fetchDiscussions = fetchDiscussions;
});
it('updates the footer notes when the vulnerbility was changed', () => {
const newState = 'dismissed';
findHeader().vm.$emit('vulnerability-state-change', newState);
it('updates the footer notes when the vulnerbility state was changed', () => {
findHeader().vm.$emit('vulnerability-state-change');
expect(fetchDiscussions).toHaveBeenCalledTimes(1);
expect(refreshVulnerability).not.toHaveBeenCalled();
});
it('updates the header when the footer received a state-change note', () => {
findHeader().vm.$emit('vulnerability-state-change', undefined);
findFooter().vm.$emit('vulnerability-state-change');
expect(fetchDiscussions).not.toHaveBeenCalled();
expect(refreshVulnerability).toHaveBeenCalledTimes(1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment