-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
5 changed files
with
66 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,6 +132,18 @@ The admin api only allows the creating of users using the email/password sign-in | |
;; :disabled false | ||
;;} | ||
|
||
(charm-admin/create-user "[email protected]" "superstrong6characterpassword" "my-very-own-custom-uuid") | ||
;;{ | ||
;; :email [email protected] | ||
;; :email-verified false | ||
;; :uid my-very-own-custom-uuid | ||
;; :provider-id firebase | ||
;; :photo-url nil | ||
;; :phone-number nil | ||
;; :display-name nil | ||
;; :disabled false | ||
;;} | ||
|
||
(charm-admin/get-user "vMnMJvS28kWr5pb6sByHULMLelJ3") | ||
;;{ | ||
;; :email [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
"Template for tests" | ||
|
||
(deftest test-tempate | ||
(testing "Testing functionname" | ||
(testing "Testing function name" | ||
(let [data "" other ""] | ||
(do | ||
(is (= (#'charmander.admin/privatefunction inputs) answer)) | ||
|
@@ -40,7 +40,17 @@ | |
(is (= (:email response) (str unique "@domain.com"))) | ||
(is (not (= response response2))) | ||
(#'charmander.admin/delete-user (:uid response))))))) | ||
|
||
|
||
(deftest test-create-user-with-uid | ||
(testing "Testing the creating of new users with uid" | ||
(let [unique (str (uuid/v1) "-" (uuid/v1))] | ||
(let [response (#'charmander.admin/create-user (str unique "@domain.com") "superDuperSecure" unique) | ||
response2 (#'charmander.admin/create-user (str unique "[email protected]") "superDuperSecure" unique)] | ||
(do | ||
(is (= (:email response) (str unique "@domain.com"))) | ||
(is (not (= response response2))) | ||
(#'charmander.admin/delete-user unique)))))) | ||
|
||
(deftest test-all-get-users | ||
(testing "Testing the retrieval of user by uid or by email" | ||
(let [unique (str (uuid/v1))] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
"Template for tests" | ||
|
||
(deftest test-tempate | ||
(testing "Testing functionname" | ||
(testing "Testing function name" | ||
(let [data "" other ""] | ||
(do | ||
(is (= (#'charmander.admin/privatefunction inputs) answer)) | ||
|
@@ -40,7 +40,17 @@ | |
(is (= (:email response) (str unique "@domain.com"))) | ||
(is (not (= response response2))) | ||
(#'charmander.admin/delete-user (:uid response))))))) | ||
|
||
|
||
(deftest test-create-user-with-uid | ||
(testing "Testing the creating of new users with uid" | ||
(let [unique (str (uuid/v1) "-" (uuid/v1))] | ||
(let [response (#'charmander.admin/create-user (str unique "@domain.com") "superDuperSecure" unique) | ||
response2 (#'charmander.admin/create-user (str unique "[email protected]") "superDuperSecure" unique)] | ||
(do | ||
(is (= (:email response) (str unique "@domain.com"))) | ||
(is (not (= response response2))) | ||
(#'charmander.admin/delete-user unique)))))) | ||
|
||
(deftest test-all-get-users | ||
(testing "Testing the retrieval of user by uid or by email" | ||
(let [unique (str (uuid/v1))] | ||
|