mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 20:18:08 +00:00
fix: Allow users to login even if they have access to more than 15 accounts (#4475)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import {
|
||||
frontendURL,
|
||||
conversationUrl,
|
||||
accountIdFromPathname,
|
||||
isValidURL,
|
||||
getLoginRedirectURL,
|
||||
} from '../URLHelper';
|
||||
@@ -39,18 +38,6 @@ describe('#URL Helpers', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('accountIdFromPathname', () => {
|
||||
it('should return account id if accont scoped url is passed', () => {
|
||||
expect(accountIdFromPathname('/app/accounts/1/settings/general')).toBe(1);
|
||||
});
|
||||
it('should return empty string if accont scoped url not is passed', () => {
|
||||
expect(accountIdFromPathname('/app/accounts/settings/general')).toBe('');
|
||||
});
|
||||
it('should return empty string if empty string is passed', () => {
|
||||
expect(accountIdFromPathname('')).toBe('');
|
||||
});
|
||||
});
|
||||
|
||||
describe('isValidURL', () => {
|
||||
it('should return true if valid url is passed', () => {
|
||||
expect(isValidURL('https://chatwoot.com')).toBe(true);
|
||||
@@ -75,7 +62,7 @@ describe('#URL Helpers', () => {
|
||||
getLoginRedirectURL('7500', {
|
||||
accounts: [{ id: '7501', name: 'Test Account 7501' }],
|
||||
})
|
||||
).toBe('/app/');
|
||||
).toBe('/app/accounts/7501/dashboard');
|
||||
expect(getLoginRedirectURL('7500', null)).toBe('/app/');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user