summaryrefslogtreecommitdiff
path: root/test/UnitWOPISaveAs.cpp
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2017-10-24 11:31:39 +0200
committerJan Holesovsky <kendy@collabora.com>2017-10-26 11:11:38 +0200
commit6fe44843954bb68f8b958559b1b0ff37b945cf80 (patch)
tree56ac6b33b4a0fd927b72fee9a43e653c3341e10d /test/UnitWOPISaveAs.cpp
parent7ff432a37010031afd3da4012882b160aba51ec9 (diff)
tdf#99744 SaveAs: Use X-WOPI-SuggestedTarget instead of X-WOPI-RelativeTarget.
And the correct encoding - UTF-7 (huh). Change-Id: I6634fedb598c620128cc25a3e8fdc46e4096a756
Diffstat (limited to 'test/UnitWOPISaveAs.cpp')
-rw-r--r--test/UnitWOPISaveAs.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/UnitWOPISaveAs.cpp b/test/UnitWOPISaveAs.cpp
index 4bd3e9e06..82e89de07 100644
--- a/test/UnitWOPISaveAs.cpp
+++ b/test/UnitWOPISaveAs.cpp
@@ -33,7 +33,8 @@ public:
void assertPutFileRelativeRequest(const Poco::Net::HTTPRequest& request) override
{
- CPPUNIT_ASSERT_EQUAL(std::string("/path/to/hello world.txt"), request.get("X-WOPI-RelativeTarget"));
+ // spec says UTF-7...
+ CPPUNIT_ASSERT_EQUAL(std::string("/jan/hole+AWE-ovsk+AP0-/hello world.txt"), request.get("X-WOPI-SuggestedTarget"));
exitTest(TestResult::Ok);
}
@@ -49,7 +50,7 @@ public:
initWebsocket("/wopi/files/0?access_token=anything");
helpers::sendTextFrame(*_ws->getLOOLWebSocket(), "load url=" + _wopiSrc, testName);
- helpers::sendTextFrame(*_ws->getLOOLWebSocket(), "saveas url=wopi:///path/to/hello%20world.txt", testName);
+ helpers::sendTextFrame(*_ws->getLOOLWebSocket(), "saveas url=wopi:///jan/hole%C5%A1ovsk%C3%BD/hello%20world.txt", testName);
SocketPoll::wakeupWorld();
_phase = Phase::Polling;