diff options
Diffstat (limited to 'include/weave')
-rw-r--r-- | include/weave/provider/test/mock_config_store.h | 9 | ||||
-rw-r--r-- | include/weave/settings.h | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/include/weave/provider/test/mock_config_store.h b/include/weave/provider/test/mock_config_store.h index e6411d6..a7eb374 100644 --- a/include/weave/provider/test/mock_config_store.h +++ b/include/weave/provider/test/mock_config_store.h @@ -18,10 +18,13 @@ namespace test { class MockConfigStore : public ConfigStore { public: - MockConfigStore() { + explicit MockConfigStore(bool set_expectations = true) { using testing::_; using testing::Return; + if (!set_expectations) + return; + EXPECT_CALL(*this, LoadDefaults(_)) .WillRepeatedly(testing::Invoke([](Settings* settings) { settings->firmware_version = "TEST_FIRMWARE"; @@ -39,8 +42,8 @@ class MockConfigStore : public ConfigStore { "version": 1, "device_id": "TEST_DEVICE_ID" })")); - EXPECT_CALL(*this, LoadSettings("config")).WillRepeatedly(Return("")); - EXPECT_CALL(*this, SaveSettings("config", _, _)) + EXPECT_CALL(*this, LoadSettings(_)).WillRepeatedly(Return("")); + EXPECT_CALL(*this, SaveSettings(_, _, _)) .WillRepeatedly(testing::WithArgs<1, 2>(testing::Invoke( [](const std::string& json, const DoneCallback& callback) { if (!callback.is_null()) diff --git a/include/weave/settings.h b/include/weave/settings.h index 741fff2..7cb798d 100644 --- a/include/weave/settings.h +++ b/include/weave/settings.h @@ -61,6 +61,7 @@ struct Settings { // Optional cloud information. Can be used for testing or debugging. std::string oauth_url; std::string service_url; + std::string xmpp_endpoint; // Cloud ID of the registered device. Empty if device is not registered. std::string cloud_id; |