Msg/DefineResolver

A resolver can be defined:

  • when the url and manager combination is unique

The url and manager combination must be unique

the url and manager combination is unique

Given alice has defined a resolver with url "https://foo.bar"

When bob attempts to define a resolver with url "https://foo.bar"

Then expect the resolver with id "2" and url "https://foo.bar" and manager bob.

the url and manager combination is not unique

Given alice has defined a resolver with url "https://foo.bar"

When alice attempts to define a resolver with url "https://foo.bar"

Then expect the error "a resolver with the same URL and manager already exists: unique key violation".

Event is emitted

EventDefineResolver is emitted

Given alice has defined a resolver with url "https://foo.bar"

When bob attempts to define a resolver with url "https://foo.bar"

Then expect the resolver with id "2" and url "https://foo.bar" and manager bob

And expect event with properties

{
  "id": 2
}