Ocelot-Social/backend/test/features/webfinger.feature
roschaefer 7c6d5b5129 fix: Re-enable webfinger feature
Ok, so here is the plan. Let's give both our cucumber features and your
cypress tests a prominent place to live. That would be the root level
folder of our application. Second, let's revive formerly dead code step
by step.

Ie. move code from the former location `backend/features/` to `features/`
when it is ready. All edge cases should be tested with unit tests in
`backend/`, see my `webfinger.spec.js` as an example.
2019-12-02 17:31:56 +01:00

40 lines
1.5 KiB
Gherkin

Feature: Webfinger discovery
From an external server, e.g. Mastodon
I want to search for an actor alias
In order to follow the actor
Background:
Given our own server runs at "http://localhost:4123"
And we have the following users in our database:
| Slug |
| peter-lustiger |
Scenario: Receiving an actor object
When I send a GET request to "/activitypub/users/peter-lustiger"
Then I receive the following json:
"""
{
"@context": [
"https://www.w3.org/ns/activitystreams",
"https://w3id.org/security/v1"
],
"id": "http://localhost:4123/activitypub/users/peter-lustiger",
"type": "Person",
"preferredUsername": "peter-lustiger",
"name": "peter-lustiger",
"following": "http://localhost:4123/activitypub/users/peter-lustiger/following",
"followers": "http://localhost:4123/activitypub/users/peter-lustiger/followers",
"inbox": "http://localhost:4123/activitypub/users/peter-lustiger/inbox",
"outbox": "http://localhost:4123/activitypub/users/peter-lustiger/outbox",
"url": "http://localhost:4123/activitypub/@peter-lustiger",
"endpoints": {
"sharedInbox": "http://localhost:4123/activitypub/inbox"
},
"publicKey": {
"id": "http://localhost:4123/activitypub/users/peter-lustiger#main-key",
"owner": "http://localhost:4123/activitypub/users/peter-lustiger",
"publicKeyPem": "adglkjlk89235kjn8obn2384f89z5bv9..."
}
}
"""