Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "ignore NotEnoughPermissions if request author moderator or administrator" in new Context {
- for {
- partitionId <- shouldBeRight(_.createPartition("Partition 1", hidden = false))
- (threadId1, _) <- shouldBeRight(_.createThread(partitionId, "Thread 1", authorId, ""))
- (threadId2, _) <- shouldBeRight(_.createThread(partitionId, "Thread 2", authorId, ""))
- _ <- shouldBeRight(_.closeThread(threadId1, authorId))
- _ <- shouldBeRight(_.closeThread(threadId2, authorId))
- _ <- shouldBeRight(_.openThread(threadId1, moderatorId))
- _ <- shouldBeRight(_.openThread(threadId2, adminId))
- threads <- shouldBeRight(_.getThreads(partitionId, 0, 2))
- } yield {
- threads.head.isClosed should be(false)
- threads.last.isClosed should be(false)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement