@@ -39,11 +39,11 @@ test.after.always(async () => {
3939test ( 'a team moderator can update a team' , async t => {
4040 let res = await agent . post ( '/api/teams' )
4141 . send ( { name : 'road team 1' } )
42- . set ( 'Authorization' , ` Bearer user100` )
42+ . set ( 'Authorization' , ' Bearer user100' )
4343 . expect ( 200 )
4444
4545 let res2 = await agent . put ( `/api/teams/${ res . body . id } ` )
46- . set ( 'Authorization' , ` Bearer user100` )
46+ . set ( 'Authorization' , ' Bearer user100' )
4747 . send ( { name : 'building team 1' } )
4848
4949 t . is ( res2 . status , 200 )
@@ -52,11 +52,11 @@ test('a team moderator can update a team', async t => {
5252test ( 'a non-team moderator cannot update a team' , async t => {
5353 let res = await agent . post ( '/api/teams' )
5454 . send ( { name : 'road team 2' } )
55- . set ( 'Authorization' , ` Bearer user100` )
55+ . set ( 'Authorization' , ' Bearer user100' )
5656 . expect ( 200 )
5757
5858 let res2 = await agent . put ( `/api/teams/${ res . body . id } ` )
59- . set ( 'Authorization' , ` Bearer user101` )
59+ . set ( 'Authorization' , ' Bearer user101' )
6060 . send ( { name : 'building team 2' } )
6161
6262 t . is ( res2 . status , 401 )
@@ -66,24 +66,24 @@ test('an org team can be updated by the the org manager', async t => {
6666 // Let's create an organization, user100 is the owner
6767 const res = await agent . post ( '/api/organizations' )
6868 . send ( { name : 'org manager can update team' } )
69- . set ( 'Authorization' , ` Bearer user100` )
69+ . set ( 'Authorization' , ' Bearer user100' )
7070 . expect ( 200 )
7171
7272 // Let's set user101 to be a manager of this organization and create a
7373 // team in the organization
7474 await agent . put ( `/api/organizations/${ res . body . id } /addManager/101` )
75- . set ( 'Authorization' , ` Bearer user100` )
75+ . set ( 'Authorization' , ' Bearer user100' )
7676 . expect ( 200 )
7777
7878 const res2 = await agent . post ( `/api/organizations/${ res . body . id } /teams` )
7979 . send ( { name : 'org team can be updated by manager - team' } )
80- . set ( 'Authorization' , ` Bearer user101` )
80+ . set ( 'Authorization' , ' Bearer user101' )
8181 . expect ( 200 )
8282
8383 // Use the manager to update the team
8484 const res3 = await agent . put ( `/api/teams/${ res2 . body . id } ` )
8585 . send ( { name : 'org team can be updated by manager - team2' } )
86- . set ( 'Authorization' , ` Bearer user101` )
86+ . set ( 'Authorization' , ' Bearer user101' )
8787
8888 t . is ( res3 . status , 200 )
8989} )
@@ -92,25 +92,25 @@ test('an org team can be updated by the owner of the org', async t => {
9292 // Let's create an organization, user100 is the owner
9393 const res = await agent . post ( '/api/organizations' )
9494 . send ( { name : 'org owner can update team' } )
95- . set ( 'Authorization' , ` Bearer user100` )
95+ . set ( 'Authorization' , ' Bearer user100' )
9696 . expect ( 200 )
9797
9898 // Let's set user101 to be a manager of this organization and create a
9999 // team in the organization
100100 await agent . put ( `/api/organizations/${ res . body . id } /addManager/101` )
101- . set ( 'Authorization' , ` Bearer user100` )
101+ . set ( 'Authorization' , ' Bearer user100' )
102102 . expect ( 200 )
103103
104104 const res2 = await agent . post ( `/api/organizations/${ res . body . id } /teams` )
105105 . send ( { name : 'org team can be updated by owner - team' } )
106- . set ( 'Authorization' , ` Bearer user101` )
106+ . set ( 'Authorization' , ' Bearer user101' )
107107 . expect ( 200 )
108108
109109 // user101 is the moderator and manager, but user100 should be able
110110 // to edit this team
111111 const res3 = await agent . put ( `/api/teams/${ res2 . body . id } ` )
112112 . send ( { name : 'org team can be updated by owner - team2' } )
113- . set ( 'Authorization' , ` Bearer user100` )
113+ . set ( 'Authorization' , ' Bearer user100' )
114114
115115 t . is ( res3 . status , 200 )
116116} )
0 commit comments