updateProfile: Resolved the issue of duplicate keys.

If another key includes "PHOTO" during the API update process, it must be removed.

Change-Id: Ic338263ec3966556c61e12752ccea91fb730b794
This commit is contained in:
Leopold Chappuis
2024-11-20 16:28:58 -05:00
committed by Léopold Chappuis
parent d2e12fc12c
commit 0fc67d6c09
6 changed files with 33 additions and 3 deletions

View File

@ -42,6 +42,7 @@ private:
void to_string_test();
void to_number_test();
void split_string_test();
void starts_with_test();
void version_test();
CPPUNIT_TEST_SUITE(StringUtilsTest);
@ -49,6 +50,7 @@ private:
CPPUNIT_TEST(to_string_test);
CPPUNIT_TEST(to_number_test);
CPPUNIT_TEST(split_string_test);
CPPUNIT_TEST(starts_with_test);
CPPUNIT_TEST(version_test);
CPPUNIT_TEST_SUITE_END();
@ -142,6 +144,15 @@ StringUtilsTest::version_test()
split_string_to_unsigned("1.2.3.5", '.')));
}
void
StringUtilsTest::starts_with_test()
{
CPPUNIT_ASSERT(starts_with("test", "te"));
CPPUNIT_ASSERT(starts_with("test", "test"));
CPPUNIT_ASSERT(!starts_with("test", "testt"));
CPPUNIT_ASSERT(!starts_with("test", "es"));
}
} // namespace test
} // namespace jami