summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/mirror-health-color.pipe.spec.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/mirror-health-color.pipe.spec.ts')
-rw-r--r--src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/mirror-health-color.pipe.spec.ts25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/mirror-health-color.pipe.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/mirror-health-color.pipe.spec.ts
new file mode 100644
index 000000000..52ff84be1
--- /dev/null
+++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/mirroring/mirror-health-color.pipe.spec.ts
@@ -0,0 +1,25 @@
+import { MirrorHealthColorPipe } from './mirror-health-color.pipe';
+
+describe('MirrorHealthColorPipe', () => {
+ const pipe = new MirrorHealthColorPipe();
+
+ it('create an instance', () => {
+ expect(pipe).toBeTruthy();
+ });
+
+ it('transforms "warning"', () => {
+ expect(pipe.transform('warning')).toBe('badge badge-warning');
+ });
+
+ it('transforms "error"', () => {
+ expect(pipe.transform('error')).toBe('badge badge-danger');
+ });
+
+ it('transforms "success"', () => {
+ expect(pipe.transform('success')).toBe('badge badge-success');
+ });
+
+ it('transforms others', () => {
+ expect(pipe.transform('abc')).toBe('badge badge-info');
+ });
+});