Feature: OIDC & social authentication (#5190)

---------

Co-authored-by: Moritz Pflanzer <moritz@chickadee-engineering.com>
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
Moritz Pflanzer
2024-02-08 17:15:38 +01:00
committed by GitHub
parent b47f301831
commit c508be6ecd
33 changed files with 1197 additions and 190 deletions

View File

@@ -0,0 +1,30 @@
import { TestBed } from '@angular/core/testing'
import {
DjangoMessageLevel,
DjangoMessagesService,
} from './django-messages.service'
const messages = [
{ level: DjangoMessageLevel.ERROR, message: 'Error Message' },
{ level: DjangoMessageLevel.INFO, message: 'Info Message' },
]
describe('DjangoMessagesService', () => {
let service: DjangoMessagesService
beforeEach(() => {
window['DJANGO_MESSAGES'] = messages
TestBed.configureTestingModule({
providers: [DjangoMessagesService],
})
service = TestBed.inject(DjangoMessagesService)
})
it('should retrieve global django messages if present', () => {
expect(service.get()).toEqual(messages)
window['DJANGO_MESSAGES'] = undefined
expect(service.get()).toEqual([])
})
})