File tree Expand file tree Collapse file tree 2 files changed +20
-10
lines changed
tests/InvvardDev.Ifttt.Tests/Controllers Expand file tree Collapse file tree 2 files changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -2,17 +2,27 @@ name: Continuous Integration
22run-name : CI ${{ github.ref_name }}
33
44on :
5+ pull_request :
6+ branches :
7+ - " feature/*"
8+ - " fix/*"
9+
510 pull_request_target :
6- branches : ["develop"]
7- types : [opened, closed]
11+ branches :
12+ - " develop"
13+ types :
14+ - closed
15+
816 push :
9- branches : ["feature/*"]
17+ branches :
18+ - " feature/*"
19+ - " fix/*"
1020 paths :
1121 - " src/**"
1222 - " tests/**"
1323
1424concurrency :
15- group : ci-${{ github.workflow }}-${{ github.actor_id }}
25+ group : ci-${{ github.workflow }}-${{ github.ref_name }}
1626 cancel-in-progress : true
1727
1828jobs :
Original file line number Diff line number Diff line change @@ -74,8 +74,8 @@ public async Task SetupTest_WhenProcessorHasNoDataField_ShouldReturn200OKWithEmp
7474 . Subject . Value . Should ( ) . BeEquivalentTo ( expectedBody ) ;
7575 }
7676
77- [ Fact ( DisplayName = "SetupTest when there is an exception, should log an error and return 500InternalServerError " ) ]
78- public async Task SetupTest_WhenThereIsAnException_ShouldReturn500InternalServerError ( )
77+ [ Fact ( DisplayName = "SetupTest when there is an exception, should log an error and return 400 Bad Request " ) ]
78+ public async Task SetupTest_WhenThereIsAnException_ShouldReturn400BadRequestError ( )
7979 {
8080 // Arrange
8181 const string expectedErrorMessage = "Error while setting up test" ;
@@ -101,12 +101,12 @@ public async Task SetupTest_WhenThereIsAnException_ShouldReturn500InternalServer
101101 result . Should ( )
102102 . NotBeNull ( )
103103 . And . Subject . Should ( )
104- . BeOfType < ObjectResult > ( )
104+ . BeOfType < BadRequestObjectResult > ( )
105105 . Subject . StatusCode . Should ( )
106- . Be ( StatusCodes . Status500InternalServerError ) ;
106+ . Be ( StatusCodes . Status400BadRequest ) ;
107107
108- result . As < ObjectResult > ( ) . Value . Should ( ) . BeOfType < ProblemDetails > ( )
109- . Which . Detail . Should ( ) . Be ( expectedErrorJson ) ;
108+ result . As < BadRequestObjectResult > ( ) . Value . Should ( ) . BeOfType < string > ( )
109+ . Which . Should ( ) . Be ( expectedErrorJson ) ;
110110 }
111111
112112 [ Fact ( DisplayName = "SetupTest when processor has data field, should return 200OK with samples processor payload" ) ]
You can’t perform that action at this time.
0 commit comments