1
1
{-# LANGUAGE DuplicateRecordFields #-}
2
+
2
3
module Anti.CliSpec
3
4
( spec
4
5
, runDummyServer
@@ -22,7 +23,6 @@ import Anti.Types
22
23
, TokenId (.. )
23
24
, UserCommand (.. )
24
25
, Username (.. )
25
- , userCommand
26
26
)
27
27
import Control.Concurrent (threadDelay )
28
28
import Control.Concurrent.Async (async )
@@ -79,18 +79,14 @@ spec = beforeAll_ runDummyServer $ do
79
79
, port = Port 8084
80
80
, command =
81
81
UserCommand
82
- { userCommand =
83
- RegisterPublicKey
84
- { platform = Platform " github"
85
- , username = Username " bob"
86
- , pubkeyhash =
87
- PublicKeyHash
88
- " 607a0d8a64616a407537edf0d9b59cf4cb509c556f6d2de4250ce15df2"
89
- }
90
- , tokenId =
91
- TokenId
92
- " dummyTokenId"
93
- }
82
+ RegisterPublicKey
83
+ { platform = Platform " github"
84
+ , username = Username " bob"
85
+ , pubkeyhash =
86
+ PublicKeyHash
87
+ " 607a0d8a64616a407537edf0d9b59cf4cb509c556f6d2de4250ce15df2"
88
+ , tokenId = TokenId " dummyTokenId"
89
+ }
94
90
}
95
91
anti args
96
92
`shouldReturn` (opts, dummyTxId)
@@ -111,18 +107,14 @@ spec = beforeAll_ runDummyServer $ do
111
107
, port = Port 8084
112
108
, command =
113
109
UserCommand
114
- { userCommand =
115
- UnregisterPublicKey
116
- { platform = Platform " github"
117
- , username = Username " bob"
118
- , pubkeyhash =
119
- PublicKeyHash
120
- " 607a0d8a64616a407537edf0d9b59cf4cb509c556f6d2de4250ce15df2"
121
- }
122
- , tokenId =
123
- TokenId
124
- " dummyTokenId"
125
- }
110
+ UnregisterPublicKey
111
+ { platform = Platform " github"
112
+ , username = Username " bob"
113
+ , pubkeyhash =
114
+ PublicKeyHash
115
+ " 607a0d8a64616a407537edf0d9b59cf4cb509c556f6d2de4250ce15df2"
116
+ , tokenId = TokenId " dummyTokenId"
117
+ }
126
118
}
127
119
anti args `shouldReturn` (opts, dummyTxId)
128
120
@@ -144,17 +136,13 @@ spec = beforeAll_ runDummyServer $ do
144
136
, port = Port 8084
145
137
, command =
146
138
UserCommand
147
- { userCommand =
148
- RegisterRole
149
- { platform = Platform " github"
150
- , repository = Repository " cardano-foundation" " antithesis"
151
- , role = Role " maintainer"
152
- , username = Username " bob"
153
- }
154
- , tokenId =
155
- TokenId
156
- " dummyTokenId"
157
- }
139
+ RegisterRole
140
+ { platform = Platform " github"
141
+ , repository = Repository " cardano-foundation" " antithesis"
142
+ , role = Role " maintainer"
143
+ , username = Username " bob"
144
+ , tokenId = TokenId " dummyTokenId"
145
+ }
158
146
}
159
147
160
148
anti args `shouldReturn` (opts, dummyTxId)
@@ -177,17 +165,13 @@ spec = beforeAll_ runDummyServer $ do
177
165
, port = Port 8084
178
166
, command =
179
167
UserCommand
180
- { userCommand =
181
- UnregisterRole
182
- { platform = Platform " github"
183
- , repository = Repository " cardano-foundation" " antithesis"
184
- , role = Role " maintainer"
185
- , username = Username " bob"
186
- }
187
- , tokenId =
188
- TokenId
189
- " dummyTokenId"
190
- }
168
+ UnregisterRole
169
+ { platform = Platform " github"
170
+ , repository = Repository " cardano-foundation" " antithesis"
171
+ , role = Role " maintainer"
172
+ , username = Username " bob"
173
+ , tokenId = TokenId " dummyTokenId"
174
+ }
191
175
}
192
176
193
177
anti args `shouldReturn` (opts, dummyTxId)
@@ -210,17 +194,13 @@ spec = beforeAll_ runDummyServer $ do
210
194
, port = Port 8084
211
195
, command =
212
196
UserCommand
213
- { userCommand =
214
- RequestTest
215
- { platform = Platform " github"
216
- , repository = Repository " cardano-foundation" " antithesis"
217
- , username = Username " bob"
218
- , commit = SHA1 " 9114528e2343e6fcf3c92de71364275227e6b16d"
219
- , directory = Directory " ."
220
- }
221
- , tokenId =
222
- TokenId
223
- " dummyTokenId"
224
- }
197
+ RequestTest
198
+ { platform = Platform " github"
199
+ , repository = Repository " cardano-foundation" " antithesis"
200
+ , username = Username " bob"
201
+ , commit = SHA1 " 9114528e2343e6fcf3c92de71364275227e6b16d"
202
+ , directory = Directory " ."
203
+ , tokenId = TokenId " dummyTokenId"
204
+ }
225
205
}
226
206
anti args `shouldReturn` (opts, dummyTxId)
0 commit comments