Browse Source

Tests for states in case of no check at all

aeris 1 year ago
parent
commit
e1079d05f4
1 changed files with 10 additions and 0 deletions
  1. 10
    0
      spec/cryptcheck/state_spec.rb

+ 10
- 0
spec/cryptcheck/state_spec.rb View File

@@ -357,6 +357,11 @@ module CryptCheck
357 357
 		end
358 358
 
359 359
 		describe '::state' do
360
+			it 'must return false on bad case with nothing' do
361
+				states = { critical: {} }
362
+				expect(State.state states, :critical).to be_falsey
363
+			end
364
+
360 365
 			it 'must return false on bad case with only nil' do
361 366
 				states = { critical: { foo: nil } }
362 367
 				expect(State.state states, :critical).to be_falsey
@@ -372,6 +377,11 @@ module CryptCheck
372 377
 				expect(State.state states, :critical).to be_truthy
373 378
 			end
374 379
 
380
+			it 'must return :all on good case with nothing' do
381
+				states = { best: {} }
382
+				expect(State.state states, :best).to eq :all
383
+			end
384
+
375 385
 			it 'must return :all on good case with only nil' do
376 386
 				states = { best: { foo: nil } }
377 387
 				expect(State.state states, :best).to eq :all

Loading…
Cancel
Save