Closed saroar closed 2 years ago
I have run test url create is passed
func testBaseURL() throws {
var user = UserOutput.withNumber
user.id = ObjectId("5fabb1ebaa5f5774ccfe48c3")
user.phoneNumber = "+79218821217"
let input = MessageItem(
id: ObjectId("60fad9bdb14a1dc66e77d72a"),
conversationId: ObjectId("5fabcd48f4271d1963025d4f")!,
messageBody: "I will ping you soon 🔜 101",
messageType: .text,
isRead: true,
isDelivered: true,
sender: user
)
XCTAssertEqual(
"http://10.0.1.2:6060/v1/conversations/5fabcd48f4271d1963025d4f/messages",
URLRequest(
data:
try siteRouter
.baseURL("http://10.0.1.2:6060")
.print(
.conversationEngine(
.conversations(
.conversation(
id: "5fabcd48f4271d1963025d4f",
route: .messages(
.update(route: .update(input: input))
)
)
)
)
)
)?.url?.absoluteString
)
}
project path can be found here https://github.com/pointfreeco/swift-url-routing/discussions/41
hi I feel it bug so deice to share it as I also create new Discussions
here what I am trying
WORKING FINE
[ INFO ] GET v1/conversations/5fabcd48f4271d1963025d4f/messages/60fad9bdb14a1dc66e77d72a [ INFO ] GET /v1/conversations/5fabcd48f4271d1963025d4f/messages [ INFO ] DELETE /v1/conversations/5fabcd48f4271d1963025d4f/messages
POST url not working
[ INFO ] POST /v1/conversations/5fabcd48f4271d1963025d4f/messages [ INFO ] PUT /v1/conversations/5fabcd48f4271d1963025d4f/messages [ INFO ] error: multiple failures occurred