Commit 74f8c0737f75721da9a079283a49e828717e6dfa

Authored by Dan Keenan
Committed by Moritz Wirger
1 parent 5b733fa5

Update tests

Showing 1 changed file with 13 additions and 11 deletions
test/test_Group.cpp
@@ -268,32 +268,34 @@ TEST_F(GroupTest, createSceneAction) @@ -268,32 +268,34 @@ TEST_F(GroupTest, createSceneAction)
268 268
269 TEST(CreateGroup, LightGroup) 269 TEST(CreateGroup, LightGroup)
270 { 270 {
271 - EXPECT_EQ(nlohmann::json({{"lights", {"1"}}, {"type", "LightGroup"}, {"name", "Name"}}), 271 + EXPECT_EQ(nlohmann::json({{"lights", {"1"}}, {"type", "LightGroup"}, {"name", "Name"}, {"class", "Other"}}),
272 CreateGroup::LightGroup({1}, "Name").getRequest()); 272 CreateGroup::LightGroup({1}, "Name").getRequest());
273 - EXPECT_EQ(  
274 - nlohmann::json({{"lights", {"2", "4"}}, {"type", "LightGroup"}}), CreateGroup::LightGroup({2, 4}).getRequest()); 273 + EXPECT_EQ(nlohmann::json({{"lights", {"2", "4"}}, {"type", "LightGroup"}, {"class", "Other"}}),
  274 + CreateGroup::LightGroup({2, 4}).getRequest());
275 } 275 }
276 276
277 TEST(CreateGroup, Entertainment) 277 TEST(CreateGroup, Entertainment)
278 { 278 {
279 - EXPECT_EQ(nlohmann::json({{"lights", {"1"}}, {"type", "Entertainment"}, {"name", "Name"}}), 279 + EXPECT_EQ(nlohmann::json({{"lights", {"1"}}, {"type", "Entertainment"}, {"name", "Name"}, {"class", "Other"}}),
280 CreateGroup::Entertainment({1}, "Name").getRequest()); 280 CreateGroup::Entertainment({1}, "Name").getRequest());
281 - EXPECT_EQ(nlohmann::json({{"lights", {"2", "4"}}, {"type", "Entertainment"}}), 281 + EXPECT_EQ(nlohmann::json({{"lights", {"2", "4"}}, {"type", "Entertainment"}, {"class", "Other"}}),
282 CreateGroup::Entertainment({2, 4}).getRequest()); 282 CreateGroup::Entertainment({2, 4}).getRequest());
283 } 283 }
284 284
285 TEST(CreateGroup, Zone) 285 TEST(CreateGroup, Zone)
286 { 286 {
287 - EXPECT_EQ(nlohmann::json({{"lights", {"1"}}, {"type", "Zone"}, {"name", "Name"}}), 287 + EXPECT_EQ(nlohmann::json({{"lights", {"1"}}, {"type", "Zone"}, {"name", "Name"}, {"class", "Other"}}),
288 CreateGroup::Zone({1}, "Name").getRequest()); 288 CreateGroup::Zone({1}, "Name").getRequest());
289 - EXPECT_EQ(nlohmann::json({{"lights", {"2", "4"}}, {"type", "Zone"}}), CreateGroup::Zone({2, 4}).getRequest()); 289 + EXPECT_EQ(nlohmann::json({{"lights", {"2", "4"}}, {"type", "Zone"}, {"class", "Other"}}),
  290 + CreateGroup::Zone({2, 4}).getRequest());
290 } 291 }
291 292
292 TEST(CreateGroup, Room) 293 TEST(CreateGroup, Room)
293 { 294 {
294 - EXPECT_EQ(nlohmann::json({{"lights", {"1"}}, {"type", "Room"}, {"name", "Name"}, {"class", "Bedroom"}}), 295 + EXPECT_EQ(nlohmann::json({{"lights", {"1"}}, {"type", "Room"}, {"name", "Name"}, {"class", "Bedroom"}, {"class", "Other"}}),
295 CreateGroup::Room({1}, "Name", "Bedroom").getRequest()); 296 CreateGroup::Room({1}, "Name", "Bedroom").getRequest());
296 - EXPECT_EQ(nlohmann::json({{"lights", {"1"}}, {"type", "Room"}, {"name", "Name"}}), 297 + EXPECT_EQ(nlohmann::json({{"lights", {"1"}}, {"type", "Room"}, {"name", "Name"}, {"class", "Other"}}),
297 CreateGroup::Room({1}, "Name").getRequest()); 298 CreateGroup::Room({1}, "Name").getRequest());
298 - EXPECT_EQ(nlohmann::json({{"lights", {"2", "4"}}, {"type", "Room"}}), CreateGroup::Room({2, 4}).getRequest());  
299 -}  
300 \ No newline at end of file 299 \ No newline at end of file
  300 + EXPECT_EQ(nlohmann::json({{"lights", {"2", "4"}}, {"type", "Room"}, {"class", "Other"}}),
  301 + CreateGroup::Room({2, 4}).getRequest());
  302 +}