From 0efd20012368c76e6df1ca7d46e68e5315c18b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mahieu?= Date: Thu, 14 Jan 2016 12:29:36 +0100 Subject: [PATCH] README: add function reference From https://github.com/strongloop/loopback-testing/pull/44 --- README.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/README.md b/README.md index dcb2e68..b429d6a 100644 --- a/README.md +++ b/README.md @@ -110,3 +110,56 @@ new TestDataBuilder() // context.notification }); ``` + +## Function reference + +LoopBack Testing (lt): +=== + + * `describe` + * `it` + * `beforeEach` + * `TestDataBuilder` + +`lt.describe`: +---- + + * `staticMethod` + * `instanceMethod` + * `whenCalledRemotely` + * `whenLoggedInAsUser` + * `whenLoggedInAsUserWithRole` + * `whenCalledByUser` + * `whenCalledByUserWithRole` + * `whenCalledAnonymously` + * `whenCalledUnauthenticated` + +`lt.it`: +---- + + * `shouldBeAllowed` + * `shouldBeDenied` + * `shouldNotBeFound` + * `shouldBeForbidden` + * `shouldBeRejected` + * `shouldBeAllowedWhenCalledAnonymously` + * `shouldBeDeniedWhenCalledAnonymously` + * `shouldBeAllowedWhenCalledUnauthenticated` + * `shouldBeDeniedWhenCalledUnauthenticated` + * `shouldBeAllowedWhenCalledByUser` + * `shouldBeDeniedWhenCalledByUser` + * `shouldBeAllowedWhenCalledByUserWithRole` + * `shouldBeDeniedWhenCalledByUserWithRole` + +`lt.beforeEach`: +---- + + * `withApp` + * `withArgs` + * `givenModel` + * `givenUser` + * `givenUserWithRole` + * `givenLoggedInUser` + * `givenLoggedInUserWithRole` + * `givenAnUnauthenticatedToken` + * `givenAnAnonymousToken`