@@ -134,9 +134,7 @@ fn remove_team_as_named_owner() {
134
134
. with_body( body. as_bytes( ) ) ) ) ;
135
135
136
136
:: mock_user ( & mut req, mock_user_on_only_x ( ) ) ;
137
- let body = :: new_req_body (
138
- :: krate ( "foo" ) , "2.0.0" , Vec :: new ( ) , Vec :: new ( ) , Vec :: new ( )
139
- ) ;
137
+ let body = :: new_req_body_foo_version_2 ( ) ;
140
138
let json = bad_resp ! ( middle. call( req. with_path( "/api/v1/crates/new" )
141
139
. with_body( & body)
142
140
. with_method( Method :: Put ) ) ) ;
@@ -166,9 +164,7 @@ fn remove_team_as_team_owner() {
166
164
assert ! ( json. errors[ 0 ] . detail. contains( "don't have permission" ) ,
167
165
"{:?}" , json. errors) ;
168
166
169
- let body = :: new_req_body (
170
- :: krate ( "foo" ) , "2.0.0" , Vec :: new ( ) , Vec :: new ( ) , Vec :: new ( )
171
- ) ;
167
+ let body = :: new_req_body_foo_version_2 ( ) ;
172
168
ok_resp ! ( middle. call( req. with_path( "/api/v1/crates/new" )
173
169
. with_body( & body)
174
170
. with_method( Method :: Put ) ) ) ;
@@ -189,9 +185,7 @@ fn publish_not_owned() {
189
185
. with_body( body. as_bytes( ) ) ) ) ;
190
186
191
187
:: mock_user ( & mut req, mock_user_on_only_x ( ) ) ;
192
- let body = :: new_req_body (
193
- :: krate ( "foo" ) , "2.0.0" , Vec :: new ( ) , Vec :: new ( ) , Vec :: new ( )
194
- ) ;
188
+ let body = :: new_req_body_foo_version_2 ( ) ;
195
189
let json = bad_resp ! ( middle. call( req. with_path( "/api/v1/crates/new" )
196
190
. with_body( & body)
197
191
. with_method( Method :: Put ) ) ) ;
@@ -213,9 +207,7 @@ fn publish_owned() {
213
207
. with_body( body. as_bytes( ) ) ) ) ;
214
208
215
209
:: mock_user ( & mut req, mock_user_on_only_x ( ) ) ;
216
- let body = :: new_req_body (
217
- :: krate ( "foo" ) , "2.0.0" , Vec :: new ( ) , Vec :: new ( ) , Vec :: new ( )
218
- ) ;
210
+ let body = :: new_req_body_foo_version_2 ( ) ;
219
211
ok_resp ! ( middle. call( req. with_path( "/api/v1/crates/new" )
220
212
. with_body( & body)
221
213
. with_method( Method :: Put ) ) ) ;
0 commit comments