@@ -40,7 +40,10 @@ module('Mirage | PUT /api/v1/crates/:name/owners', function (hooks) {
4040 let body = JSON . stringify ( { owners : [ user2 . login ] } ) ;
4141 let response = await fetch ( '/api/v1/crates/foo/owners' , { method : 'PUT' , body } ) ;
4242 assert . strictEqual ( response . status , 200 ) ;
43- assert . deepEqual ( await response . json ( ) , { ok : true } ) ;
43+ assert . deepEqual ( await response . json ( ) , {
44+ ok : true ,
45+ msg : 'user user-2 has been invited to be an owner of crate foo' ,
46+ } ) ;
4447
4548 let owners = this . server . schema . crateOwnerships . where ( { crateId : crate . id } ) ;
4649 assert . strictEqual ( owners . length , 1 ) ;
@@ -64,7 +67,10 @@ module('Mirage | PUT /api/v1/crates/:name/owners', function (hooks) {
6467 let body = JSON . stringify ( { owners : [ team . login ] } ) ;
6568 let response = await fetch ( '/api/v1/crates/foo/owners' , { method : 'PUT' , body } ) ;
6669 assert . strictEqual ( response . status , 200 ) ;
67- assert . deepEqual ( await response . json ( ) , { ok : true } ) ;
70+ assert . deepEqual ( await response . json ( ) , {
71+ ok : true ,
72+ msg : 'team github:rust-lang:team-1 has been added as an owner of crate foo' ,
73+ } ) ;
6874
6975 let owners = this . server . schema . crateOwnerships . where ( { crateId : crate . id } ) ;
7076 assert . strictEqual ( owners . length , 2 ) ;
@@ -91,7 +97,10 @@ module('Mirage | PUT /api/v1/crates/:name/owners', function (hooks) {
9197 let body = JSON . stringify ( { owners : [ user2 . login , team . login , user3 . login ] } ) ;
9298 let response = await fetch ( '/api/v1/crates/foo/owners' , { method : 'PUT' , body } ) ;
9399 assert . strictEqual ( response . status , 200 ) ;
94- assert . deepEqual ( await response . json ( ) , { ok : true } ) ;
100+ assert . deepEqual ( await response . json ( ) , {
101+ ok : true ,
102+ msg : 'user user-2 has been invited to be an owner of crate foo,team github:rust-lang:team-1 has been added as an owner of crate foo,user user-3 has been invited to be an owner of crate foo' ,
103+ } ) ;
95104
96105 let owners = this . server . schema . crateOwnerships . where ( { crateId : crate . id } ) ;
97106 assert . strictEqual ( owners . length , 2 ) ;
0 commit comments