Skip to content

Commit

Permalink
MOBILE-4201 login: Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyserver committed Sep 6, 2023
1 parent d76e90c commit 8f14be5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions src/core/features/login/tests/credentials.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { CoreSites } from '@services/sites';
import { Http } from '@singletons';
import { of } from 'rxjs';
import { CoreLoginHelper } from '../services/login-helper';
import { CoreConstants } from '@/core/constants';

describe('Credentials page', () => {

Expand Down Expand Up @@ -80,6 +81,28 @@ describe('Credentials page', () => {
errorcode: 'invalidlogin',
});
},
checkSite: async () => ({
code: 0,
siteUrl,
service: CoreConstants.CONFIG.wsservice,
config: ({
wwwroot: siteUrl,
httpswwwroot: siteUrl,
sitename: 'Example Campus',
guestlogin: 0,
rememberusername: 0,
authloginviaemail: 0,
registerauth: '',
forgottenpasswordurl: '',
authinstructions: '',
authnoneenabled: 0,
enablewebservices: 1,
enablemobilewebservice: 1,
maintenanceenabled: 0,
maintenancemessage: '',
typeoflogin: 1,
}),
}),
});

mockSingleton(CoreLoginHelper, { getAvailableSites: async () => [] });
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8f14be5

Please sign in to comment.