ソースを参照

Add failing test for effect key

Christopher Mullins 6 年 前
コミット
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