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', () => { ...@@ -63,7 +63,7 @@ describe('Vulnerability', () => {
const findFooter = () => wrapper.find(Footer); const findFooter = () => wrapper.find(Footer);
describe('default behavior', () => { describe('default behavior', () => {
it('consits of header, details and footer', () => { it('consists of header, details, and footer', () => {
expect(findHeader().exists()).toBe(true); expect(findHeader().exists()).toBe(true);
expect(findDetails().exists()).toBe(true); expect(findDetails().exists()).toBe(true);
expect(findFooter().exists()).toBe(true); expect(findFooter().exists()).toBe(true);
...@@ -111,17 +111,15 @@ describe('Vulnerability', () => { ...@@ -111,17 +111,15 @@ describe('Vulnerability', () => {
findFooter().vm.fetchDiscussions = fetchDiscussions; findFooter().vm.fetchDiscussions = fetchDiscussions;
}); });
it('updates the footer notes when the vulnerbility was changed', () => { it('updates the footer notes when the vulnerbility state was changed', () => {
const newState = 'dismissed'; findHeader().vm.$emit('vulnerability-state-change');
findHeader().vm.$emit('vulnerability-state-change', newState);
expect(fetchDiscussions).toHaveBeenCalledTimes(1); expect(fetchDiscussions).toHaveBeenCalledTimes(1);
expect(refreshVulnerability).not.toHaveBeenCalled(); expect(refreshVulnerability).not.toHaveBeenCalled();
}); });
it('updates the header when the footer received a state-change note', () => { 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(fetchDiscussions).not.toHaveBeenCalled();
expect(refreshVulnerability).toHaveBeenCalledTimes(1); 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