Fixed tests for Easy::Status.

The data was invalid JSON.
This commit is contained in:
tastytea 2019-08-12 05:27:06 +02:00
parent 4922fc79fe
commit dc09d3db5b
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 6 additions and 7 deletions

View File

@ -66,16 +66,15 @@ SCENARIO ("Easy::Status works as intended", "[entity]")
"\"remote_url\":\"https://example.com/media/debian.svg\"," "\"remote_url\":\"https://example.com/media/debian.svg\","
"\"text_url\":\"https://example.com/media/debian.svg\"," "\"text_url\":\"https://example.com/media/debian.svg\","
"\"type\":\"unknown\"," "\"type\":\"unknown\","
"\"url\":\"https://example.com/media/debian.svg\"]," "\"url\":\"https://example.com/media/debian.svg\"}],"
",\"mentions\":[]," "\"mentions\":[],"
",\"muted\":false,\"pinned\":false," "\"muted\":false,\"pinned\":false,"
"\"poll\":null,\"reblog\":null,\"reblogged\":false," "\"poll\":null,\"reblog\":null,\"reblogged\":false,"
"\"reblogs_count\":0,\"replies_count\":0," "\"reblogs_count\":0,\"replies_count\":0,"
"\"sensitive\":false,\"spoiler_text\":\"Test\"," "\"sensitive\":false,\"spoiler_text\":\"Test\","
"\"tags\":[],\"uri\":\"https://example.com/objects/0000\"," "\"tags\":[],\"uri\":\"https://example.com/objects/0000\","
"\"url\":\"https://example.com/notice/0000\"," "\"url\":\"https://example.com/notice/0000\","
"\"visibility\":\"unlisted\"}" "\"visibility\":\"unlisted\"}";
;
try try
{ {
@ -83,7 +82,7 @@ SCENARIO ("Easy::Status works as intended", "[entity]")
} }
catch (const std::exception &e) catch (const std::exception &e)
{ {
exception = true; exception = true;
} }
THEN ("No exception is thrown") THEN ("No exception is thrown")
@ -93,7 +92,7 @@ SCENARIO ("Easy::Status works as intended", "[entity]")
REQUIRE_FALSE(exception); REQUIRE_FALSE(exception);
REQUIRE(status.valid()); REQUIRE(status.valid());
REQUIRE(status.account().id() == "9hnrrVPriLiLVAhfVo"); REQUIRE(status.account().id() == "9hnrrVPriLiLVAhfVo");
REQUIRE(status.content = "This is another test-post."); REQUIRE(status.content() == "This is another test-post.");
REQUIRE(status.visibility() == Easy::visibility_type::Unlisted); REQUIRE(status.visibility() == Easy::visibility_type::Unlisted);
} }
} }