File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
AspNetCoreTemplate.Services.Data.Tests
AspNetCoreTemplate.Web.Tests Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -21,15 +21,15 @@ public class SettingsServiceTests
21
21
public void GetCountShouldReturnCorrectNumber ( )
22
22
{
23
23
var repository = new Mock < IDeletableEntityRepository < Setting > > ( ) ;
24
- repository . Setup ( r => r . All ( ) ) . Returns ( new List < Setting >
24
+ repository . Setup ( r => r . AllAsNoTracking ( ) ) . Returns ( new List < Setting >
25
25
{
26
26
new Setting ( ) ,
27
27
new Setting ( ) ,
28
28
new Setting ( ) ,
29
29
} . AsQueryable ( ) ) ;
30
30
var service = new SettingsService ( repository . Object ) ;
31
31
Assert . Equal ( 3 , service . GetCount ( ) ) ;
32
- repository . Verify ( x => x . All ( ) , Times . Once ) ;
32
+ repository . Verify ( x => x . AllAsNoTracking ( ) , Times . Once ) ;
33
33
}
34
34
35
35
[ Fact ]
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ public WebTests(WebApplicationFactory<Program> server)
16
16
this . server = server ;
17
17
}
18
18
19
- [ Fact ( Skip = "Example test. Disabled for CI." ) ]
19
+ [ Fact ]
20
20
public async Task IndexPageShouldReturnStatusCode200WithTitle ( )
21
21
{
22
22
var client = this . server . CreateClient ( ) ;
@@ -26,7 +26,7 @@ public async Task IndexPageShouldReturnStatusCode200WithTitle()
26
26
Assert . Contains ( "<title>" , responseContent ) ;
27
27
}
28
28
29
- [ Fact ( Skip = "Example test. Disabled for CI." ) ]
29
+ [ Fact ]
30
30
public async Task AccountManagePageRequiresAuthorization ( )
31
31
{
32
32
var client = this . server . CreateClient ( new WebApplicationFactoryClientOptions { AllowAutoRedirect = false } ) ;
You can’t perform that action at this time.
0 commit comments