]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/mirror-health-color.pipe.spec.ts
import 15.2.4
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / block / mirroring / mirror-health-color.pipe.spec.ts
CommitLineData
11fdf7f2
TL
1import { MirrorHealthColorPipe } from './mirror-health-color.pipe';
2
3describe('MirrorHealthColorPipe', () => {
4 const pipe = new MirrorHealthColorPipe();
5
6 it('create an instance', () => {
7 expect(pipe).toBeTruthy();
8 });
9
10 it('transforms "warning"', () => {
9f95a23c 11 expect(pipe.transform('warning')).toBe('badge badge-warning');
11fdf7f2
TL
12 });
13
14 it('transforms "error"', () => {
9f95a23c 15 expect(pipe.transform('error')).toBe('badge badge-danger');
11fdf7f2
TL
16 });
17
18 it('transforms "success"', () => {
9f95a23c 19 expect(pipe.transform('success')).toBe('badge badge-success');
11fdf7f2
TL
20 });
21
22 it('transforms others', () => {
9f95a23c 23 expect(pipe.transform('abc')).toBe('badge badge-info');
11fdf7f2
TL
24 });
25});