1
1
Feature : Puzzle Coupon
2
2
Scenario : PUT /event/puzzle/coupon to redeem a puzzle coupon
3
- Given there have some booths
4
- | token | name | event_id |
5
- | 1024914b -ee65 -4728 -b687 -8341f5affa89 | COSCUP | SITCON |
6
- And there have some attendees
3
+ Given there have some attendees
7
4
| token | event_id | display_name |
8
5
| f185f505 -d8c0 -43ce -9e7b -bb9e8909072d | SITCON | Aotoki |
9
- When I make a PUT request to "/event/puzzle/coupon?token=1024914b-ee65-4728-b687-8341f5affa89&event_id=SITCON" :
6
+ And there have some puzzle activity events
7
+ | id | type | aggregate_id | version | payload | occurred_at |
8
+ | b44845bd -8bd2 -428d -ad65 -f6a619bf8a96 | AttendeeInitialized | f185f505 -d8c0 -43ce -9e7b -bb9e8909072d | 0 | { "displayName ": "Aotoki " } | 2023 -09 -10 20 :48 :00 |
9
+ When I make a PUT request to "/event/puzzle/coupon?token=f185f505-d8c0-43ce-9e7b-bb9e8909072d&event_id=SITCON" :
10
10
"""
11
11
{}
12
12
"""
@@ -17,3 +17,27 @@ Feature: Puzzle Coupon
17
17
}
18
18
"""
19
19
And the response status should be 200
20
+
21
+ Scenario : PUT /event/puzzle/coupon to redeem a puzzle coupon and status is updated
22
+ Given there have some attendees
23
+ | token | event_id | display_name |
24
+ | f185f505 -d8c0 -43ce -9e7b -bb9e8909072d | SITCON | Aotoki |
25
+ And there have some puzzle activity events
26
+ | id | type | aggregate_id | version | payload | occurred_at |
27
+ | b44845bd -8bd2 -428d -ad65 -f6a619bf8a96 | AttendeeInitialized | f185f505 -d8c0 -43ce -9e7b -bb9e8909072d | 0 | { "displayName ": "Aotoki " } | 2023 -09 -10 20 :48 :00 |
28
+ When I make a PUT request to "/event/puzzle/coupon?token=f185f505-d8c0-43ce-9e7b-bb9e8909072d&event_id=SITCON" :
29
+ """
30
+ {}
31
+ """
32
+ And I make a GET request to "/event/puzzle?token=f185f505-d8c0-43ce-9e7b-bb9e8909072d"
33
+ Then the response json should be:
34
+ """
35
+ {
36
+ "user_id": "Aotoki",
37
+ "puzzles": [],
38
+ "deliverers": [],
39
+ "valid": null,
40
+ "coupon": 1693065600
41
+ }
42
+ """
43
+ And the response status should be 200
0 commit comments