浏览代码

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