generated from array-in-a-matrix/matrix-bot-template
move credential to a seperate file
This commit is contained in:
parent
59ef2580a5
commit
5036fa5bf4
2 changed files with 5 additions and 8 deletions
4
tests/credentials.nim
Normal file
4
tests/credentials.nim
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
const
|
||||||
|
homeserver*: cstring = ""
|
||||||
|
username*: cstring = ""
|
||||||
|
password*: cstring = ""
|
|
@ -1,13 +1,6 @@
|
||||||
import unittest
|
import unittest, jsconsole, nimbotsdk, credentials
|
||||||
import jsconsole
|
|
||||||
|
|
||||||
import nimbotsdk
|
|
||||||
test "can login using username and password":
|
test "can login using username and password":
|
||||||
# TODO: import account credentials from a .gitignore'd config file
|
|
||||||
const
|
|
||||||
homeserver: cstring = ""
|
|
||||||
username: cstring = ""
|
|
||||||
password: cstring = ""
|
|
||||||
|
|
||||||
let auth = newMatrixAuth(homeserver)
|
let auth = newMatrixAuth(homeserver)
|
||||||
let client = auth.passwordLogin(username, password)
|
let client = auth.passwordLogin(username, password)
|
||||||
|
|
Loading…
Add table
Reference in a new issue