@@ -28,16 +28,16 @@ public async Task Delete_Comment_with_valid_organisation_session_cookie_deletes_
2828 //Arrange
2929 var context = new ConsultationsContext ( GetContextOptions ( ) , FakeUserService . Get ( isAuthenticated : false , testUserType : TestUserType . NotAuthenticated , organisationUserId : OrganisationUserId ) , new FakeEncryption ( ) ) ;
3030 context . Database . EnsureDeleted ( ) ;
31+ var ( server , client ) = InitialiseServerAndClient ( context ) ;
3132
3233 var sourceURI = $ "consultations://./consultation/{ ConsultationId } /document/1/chapter/introduction";
3334
34- var organisationAuthorisationId = TestBaseDBHelpers . AddOrganisationAuthorisationWithLocation ( 1 , ConsultationId , context , null , "123412341234" ) ;
35+ var organisationAuthorisationId = TestBaseDBHelpers . AddOrganisationAuthorisationWithLocation ( 1 , ConsultationId , context , "NotAuthorised" , "123412341234" ) ;
3536 TestBaseDBHelpers . AddOrganisationUser ( context , organisationAuthorisationId , SessionId , null , OrganisationUserId ) ;
3637
3738 var locationId = TestBaseDBHelpers . AddLocation ( context , sourceURI ) ;
3839 var questionId = TestBaseDBHelpers . AddQuestion ( context , locationId ) ;
3940 var existingAnswerId = TestBaseDBHelpers . AddAnswer ( context , questionId , statusId : StatusId , organisationUserId : OrganisationUserId ) ;
40- var ( server , client ) = InitialiseServerAndClient ( context ) ;
4141
4242 var updatedAnswerText = Guid . NewGuid ( ) . ToString ( ) ;
4343 var updatedAnswer = new ViewModels . Answer ( existingAnswerId , updatedAnswerText , false , DateTime . UtcNow , "Carl Spackler" , questionId , StatusId ) ;
@@ -64,16 +64,16 @@ public async Task Delete_Comment_with_invalid_organisation_session_cookie_return
6464 //Arrange
6565 var context = new ConsultationsContext ( GetContextOptions ( ) , FakeUserService . Get ( isAuthenticated : false , testUserType : TestUserType . NotAuthenticated , organisationUserId : OrganisationUserId ) , new FakeEncryption ( ) ) ;
6666 context . Database . EnsureDeleted ( ) ;
67+ var ( server , client ) = InitialiseServerAndClient ( context ) ;
6768
6869 var sourceURI = $ "consultations://./consultation/{ ConsultationId } /document/1/chapter/introduction";
6970
70- var organisationAuthorisationId = TestBaseDBHelpers . AddOrganisationAuthorisationWithLocation ( 1 , ConsultationId , context , null , "123412341234" ) ;
71+ var organisationAuthorisationId = TestBaseDBHelpers . AddOrganisationAuthorisationWithLocation ( 1 , ConsultationId , context , "NotAuthorised" , "123412341234" ) ;
7172 TestBaseDBHelpers . AddOrganisationUser ( context , organisationAuthorisationId , SessionId , null , OrganisationUserId ) ;
7273
7374 var locationId = TestBaseDBHelpers . AddLocation ( context , sourceURI ) ;
7475 var questionId = TestBaseDBHelpers . AddQuestion ( context , locationId ) ;
7576 var existingAnswerId = TestBaseDBHelpers . AddAnswer ( context , questionId , statusId : StatusId , organisationUserId : OrganisationUserId ) ;
76- var ( server , client ) = InitialiseServerAndClient ( context ) ;
7777
7878 var updatedAnswerText = Guid . NewGuid ( ) . ToString ( ) ;
7979 var updatedAnswer = new ViewModels . Answer ( existingAnswerId , updatedAnswerText , false , DateTime . UtcNow , "Carl Spackler" , questionId , StatusId ) ;
@@ -98,16 +98,16 @@ public async Task Delete_Comment_with_invalid_consultation_id_in_organisation_se
9898 //Arrange
9999 var context = new ConsultationsContext ( GetContextOptions ( ) , FakeUserService . Get ( isAuthenticated : false , testUserType : TestUserType . NotAuthenticated , organisationUserId : OrganisationUserId ) , new FakeEncryption ( ) ) ;
100100 context . Database . EnsureDeleted ( ) ;
101+ var ( server , client ) = InitialiseServerAndClient ( context ) ;
101102
102103 var sourceURI = $ "consultations://./consultation/{ ConsultationId } /document/1/chapter/introduction";
103104
104- var organisationAuthorisationId = TestBaseDBHelpers . AddOrganisationAuthorisationWithLocation ( 1 , ConsultationId , context , null , "123412341234" ) ;
105+ var organisationAuthorisationId = TestBaseDBHelpers . AddOrganisationAuthorisationWithLocation ( 1 , ConsultationId , context , "NotAuthorised" , "123412341234" ) ;
105106 TestBaseDBHelpers . AddOrganisationUser ( context , organisationAuthorisationId , SessionId , null , OrganisationUserId ) ;
106107
107108 var locationId = TestBaseDBHelpers . AddLocation ( context , sourceURI ) ;
108109 var questionId = TestBaseDBHelpers . AddQuestion ( context , locationId ) ;
109110 var existingAnswerId = TestBaseDBHelpers . AddAnswer ( context , questionId , statusId : StatusId , organisationUserId : OrganisationUserId ) ;
110- var ( server , client ) = InitialiseServerAndClient ( context ) ;
111111
112112 var updatedAnswerText = Guid . NewGuid ( ) . ToString ( ) ;
113113 var updatedAnswer = new ViewModels . Answer ( existingAnswerId , updatedAnswerText , false , DateTime . UtcNow , "Carl Spackler" , questionId , StatusId ) ;
0 commit comments