|
1 | 1 | Feature: NIP-17 Gift wrap validation |
2 | | - Scenario: Anshuman publishes a valid gift wrap with one recipient |
3 | | - Given someone called Anshuman |
| 2 | + Scenario: Alice publishes a valid gift wrap with one recipient |
| 3 | + Given someone called Alice |
4 | 4 | And someone called Bob |
5 | | - When Anshuman sends a valid gift_wrap event for Bob |
6 | | - Then Anshuman receives a successful gift_wrap command result |
| 5 | + When Alice sends a valid gift_wrap event for Bob |
| 6 | + Then Alice receives a successful gift_wrap command result |
7 | 7 |
|
8 | | - Scenario: Anshuman cannot publish a gift wrap without a recipient p tag |
9 | | - Given someone called Anshuman |
10 | | - When Anshuman sends an invalid gift_wrap event without a p tag |
11 | | - Then Anshuman receives an unsuccessful gift_wrap command result with reason containing "invalid: gift wrap event (kind 1059) must have a p tag identifying the recipient" |
| 8 | + Scenario: Alice cannot publish a gift wrap without a recipient p tag |
| 9 | + Given someone called Alice |
| 10 | + When Alice sends an invalid gift_wrap event without a p tag |
| 11 | + Then Alice receives an unsuccessful gift_wrap command result with reason containing "invalid: gift wrap event (kind 1059) must have a p tag identifying the recipient" |
12 | 12 |
|
13 | | - Scenario: Anshuman cannot publish a gift wrap with multiple recipient p tags |
14 | | - Given someone called Anshuman |
| 13 | + Scenario: Alice cannot publish a gift wrap with multiple recipient p tags |
| 14 | + Given someone called Alice |
15 | 15 | And someone called Bob |
16 | 16 | And someone called Charlie |
17 | | - When Anshuman sends an invalid gift_wrap event with recipients Bob and Charlie |
18 | | - Then Anshuman receives an unsuccessful gift_wrap command result with reason containing "invalid: gift wrap event (kind 1059) must have exactly one p tag" |
| 17 | + When Alice sends an invalid gift_wrap event with recipients Bob and Charlie |
| 18 | + Then Alice receives an unsuccessful gift_wrap command result with reason containing "invalid: gift wrap event (kind 1059) must have exactly one p tag" |
19 | 19 |
|
20 | | - Scenario: Anshuman cannot publish a gift wrap with malformed NIP-44 payload |
21 | | - Given someone called Anshuman |
| 20 | + Scenario: Alice cannot publish a gift wrap with malformed NIP-44 payload |
| 21 | + Given someone called Alice |
22 | 22 | And someone called Bob |
23 | | - When Anshuman sends an invalid gift_wrap event for Bob with malformed NIP-44 payload |
24 | | - Then Anshuman receives an unsuccessful gift_wrap command result with reason containing "invalid: gift wrap content must be a valid NIP-44 v2 payload" |
| 23 | + When Alice sends an invalid gift_wrap event for Bob with malformed NIP-44 payload |
| 24 | + Then Alice receives an unsuccessful gift_wrap command result with reason containing "invalid: gift wrap content must be a valid NIP-44 v2 payload" |
25 | 25 |
|
26 | 26 | Scenario: Bob can query gift wraps addressed to him via #p |
27 | | - Given someone called Anshuman |
| 27 | + Given someone called Alice |
28 | 28 | And someone called Bob |
29 | 29 | And someone called Charlie |
30 | | - When Anshuman sends a valid gift_wrap event for Bob |
31 | | - And Anshuman sends a valid gift_wrap event for Charlie |
| 30 | + When Alice sends a valid gift_wrap event for Bob |
| 31 | + And Alice sends a valid gift_wrap event for Charlie |
32 | 32 | And Bob subscribes to gift_wrap events tagged for Bob |
33 | | - Then Bob receives 1 gift_wrap event from Anshuman tagged for Bob and EOSE |
| 33 | + Then Bob receives 1 gift_wrap event from Alice tagged for Bob and EOSE |
0 commit comments