diff options
Diffstat (limited to 'spec/frontend/static_site_editor/graphql/resolvers/has_submitted_changes_spec.js')
-rw-r--r-- | spec/frontend/static_site_editor/graphql/resolvers/has_submitted_changes_spec.js | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/spec/frontend/static_site_editor/graphql/resolvers/has_submitted_changes_spec.js b/spec/frontend/static_site_editor/graphql/resolvers/has_submitted_changes_spec.js deleted file mode 100644 index 0670b240a3f..00000000000 --- a/spec/frontend/static_site_editor/graphql/resolvers/has_submitted_changes_spec.js +++ /dev/null @@ -1,27 +0,0 @@ -import appDataQuery from '~/static_site_editor/graphql/queries/app_data.query.graphql'; -import hasSubmittedChanges from '~/static_site_editor/graphql/resolvers/has_submitted_changes'; - -describe('static_site_editor/graphql/resolvers/has_submitted_changes', () => { - it('updates the cache with the data passed in input', () => { - const cachedData = { appData: { original: 'foo' } }; - const newValue = { input: { hasSubmittedChanges: true } }; - - const cache = { - readQuery: jest.fn().mockReturnValue(cachedData), - writeQuery: jest.fn(), - }; - hasSubmittedChanges(null, newValue, { cache }); - - expect(cache.readQuery).toHaveBeenCalledWith({ query: appDataQuery }); - expect(cache.writeQuery).toHaveBeenCalledWith({ - query: appDataQuery, - data: { - appData: { - __typename: 'AppData', - original: 'foo', - hasSubmittedChanges: true, - }, - }, - }); - }); -}); |