3 Commits

Author SHA1 Message Date
Alina Beck
77f4810ddc set up global localVue
by setting up localVue with all required plugins (such as styleguide and vuex)
in a separate testSetup file we can avoid doing this individually in all component tests
the testSetup is executed before each test suite, so each test file gets a fresh
instance of localVue
2019-11-20 12:31:40 +03:00
Robert Schäfer
963cbbef32 RemovePostEmotions should return deleted object
@mattwr18 I prefer (I believe it's even best practice) that a delete
mutation should return the deleted object. If you run the delete
mutation again, it should return `null` because there is no object like
that anymore. That way the client knows if a delete mutation has changed
any state in the database.

Also I fixed another bug in the resolver. If your graphql mutation looks
like this:

```gql
mutation {
  RemovePostEmotions(to:{ id:"p15"}, data:{emotion: angry}) {
    from {
      id
      name
    }
    to {
      id
      title
    }
    emotion
  }
}
```

Then you get errors because your resolver does not return the name for
the user or the title for the post anymore. Just use spread operator...
and it's fixed.
2019-08-08 23:51:26 +02:00
Matt Rider
39a94a8aac Refactor
- follow PR review by @roschaefer
2019-08-07 14:55:32 +02:00