[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] 08/08: testing the implementation of #7521
From: |
gnunet |
Subject: |
[libeufin] 08/08: testing the implementation of #7521 |
Date: |
Wed, 08 Feb 2023 14:32:24 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
commit 6726bb63376a074dd5c8a4af0f17d80150d097fd
Author: MS <ms@taler.net>
AuthorDate: Wed Feb 8 14:31:44 2023 +0100
testing the implementation of #7521
---
nexus/src/test/kotlin/SandboxCircuitApiTest.kt | 35 ++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/nexus/src/test/kotlin/SandboxCircuitApiTest.kt
b/nexus/src/test/kotlin/SandboxCircuitApiTest.kt
index 85a41714..31955ff4 100644
--- a/nexus/src/test/kotlin/SandboxCircuitApiTest.kt
+++ b/nexus/src/test/kotlin/SandboxCircuitApiTest.kt
@@ -122,6 +122,41 @@ class SandboxCircuitApiTest {
}
}
+ // Testing that only the admin can change an account legal name.
+ @Test
+ fun patchPerm() {
+ withTestDatabase {
+ prepSandboxDb()
+ testApplication {
+ application(sandboxApp)
+ val R
=client.patch("/demobanks/default/circuit-api/accounts/foo") {
+ contentType(ContentType.Application.Json)
+ basicAuth("foo", "foo")
+ expectSuccess = false
+ setBody("""
+ {
+ "name": "new name",
+ "contact_data": {},
+ "cashout_address": "payto://iban/OUTSIDE"
+ }
+ """.trimIndent())
+ }
+ assert(R.status.value == HttpStatusCode.Forbidden.value)
+ client.patch("/demobanks/default/circuit-api/accounts/foo") {
+ contentType(ContentType.Application.Json)
+ basicAuth("admin", "foo")
+ expectSuccess = true
+ setBody("""
+ {
+ "name": "new name",
+ "contact_data": {},
+ "cashout_address": "payto://iban/OUTSIDE"
+ }
+ """.trimIndent())
+ }
+ }
+ }
+ }
// Tests the creation and confirmation of a cash-out operation.
@Test
fun cashout() {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libeufin] branch master updated (64c2d251 -> 6726bb63), gnunet, 2023/02/08
- [libeufin] 05/08: background jobs, gnunet, 2023/02/08
- [libeufin] 02/08: EBICS subscriber creation., gnunet, 2023/02/08
- [libeufin] 01/08: help message, gnunet, 2023/02/08
- [libeufin] 03/08: comments, gnunet, 2023/02/08
- [libeufin] 04/08: Tests environment., gnunet, 2023/02/08
- [libeufin] 06/08: implementing #7521, gnunet, 2023/02/08
- [libeufin] 07/08: tests: needed to specify a correct EBICS host ID., gnunet, 2023/02/08
- [libeufin] 08/08: testing the implementation of #7521,
gnunet <=