Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@willopez
Copy link
Member

Signed-off-by: Will Lopez [email protected]

Resolves #5971
Impact: minor
Type: chore | test

Issue

Adds integration test for updateShopSettings mutation

@willopez willopez requested a review from kieckhafer December 19, 2019 21:36
@willopez willopez changed the title chore: adds integration test for updateShopSettings mutation [WIP] chore: adds integration test for updateShopSettings mutation Dec 19, 2019
@kieckhafer
Copy link
Member

It seems like the issue you're seeing with permissions is that the user is not being set correctly on the context / mockContext. If you log userId right before the if check here, you'll see that userId is null, which means that it'll use the else, which automatically throws a permission error if there is no user.

I don't think this is an issue with the permissions itself, just an issue with setting the current user when testing.

It does look like you are setting the user correctly in the test, so perhaps it gets reset somewhere along the way?

@willopez willopez requested review from mikemurray and removed request for kieckhafer December 20, 2019 19:43
@willopez willopez changed the title [WIP] chore: adds integration test for updateShopSettings mutation chore: adds integration test for updateShopSettings mutation Dec 20, 2019
@willopez willopez force-pushed the chore-integration-test-updateShopSettings branch from 3b50bca to 2c4e5bb Compare December 27, 2019 19:37
@willopez willopez requested review from mikemurray and rosshadden and removed request for mikemurray December 27, 2019 19:51
@willopez willopez dismissed mikemurray’s stale review December 27, 2019 19:52

requested changes implemented

@willopez willopez merged commit 1bd7c3d into release-3.0.0 Dec 27, 2019
@willopez willopez deleted the chore-integration-test-updateShopSettings branch December 27, 2019 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants