Просмотр исходного кода

Add failing test for effect key

Christopher Mullins лет назад: 6
Родитель
Сommit
ca0729bdda
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      test/remote/spec/state_spec.rb

+ 8 - 0
test/remote/spec/state_spec.rb

@@ -374,6 +374,14 @@ RSpec.describe 'State' do
       # Should retain previous brightness
       expect(result['level']).to eq(50)
     end
+
+    it 'should support the mode and effect fields' do
+      state = @client.patch_state({status: 'ON', mode: 0}, @id_params)
+      expect(state['effect']).to eq("0")
+
+      state = @client.patch_state({effect: 1}, @id_params)
+      expect(state['effect']).to eq("1")
+    end
   end
 
   context 'increment/decrement commands' do