Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// SPDX-License-Identifier: PMPL-1.0-or-later
// Copyright (c) 2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
//
Expand Down Expand Up @@ -131,7 +131,7 @@

pub fn generate_proof(proof_type: String) -> Proof {
let ts = time_ms();
Proof {
Proof #{
proof_type: proof_type ++ "_verification",
timestamp: ts,
signature: "mock_sig_" ++ show(ts) ++ "_" ++ random_string(7),
Expand Down
12 changes: 6 additions & 6 deletions avow-protocol/telegram-bot/avow-telegram-bot/test-mock.affine
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// SPDX-License-Identifier: PMPL-1.0-or-later
// Copyright (c) 2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
//
Expand Down Expand Up @@ -92,7 +92,7 @@
}

fn make_valid_unsub() -> UnsubscribeParams {
UnsubscribeParams {
UnsubscribeParams #{
url: "https://example.com/unsubscribe",
tested_at: mock_now() - 5000,
response_code: 200,
Expand All @@ -112,7 +112,7 @@
}

pub fn test_verify_unsubscribe_invalid_url() -> Bool {
let p = UnsubscribeParams {
let p = UnsubscribeParams #{
url: "not_https",
tested_at: mock_now() - 5000,
response_code: 200,
Expand All @@ -127,7 +127,7 @@
}

pub fn test_verify_unsubscribe_stale_timestamp() -> Bool {
let p = UnsubscribeParams {
let p = UnsubscribeParams #{
url: "https://example.com/unsubscribe",
tested_at: 0,
response_code: 200,
Expand All @@ -142,7 +142,7 @@
}

pub fn test_verify_unsubscribe_bad_response_code() -> Bool {
let p = UnsubscribeParams {
let p = UnsubscribeParams #{
url: "https://example.com/unsubscribe",
tested_at: mock_now() - 5000,
response_code: 404,
Expand All @@ -157,7 +157,7 @@
}

pub fn test_verify_consent_valid() -> Bool {
let p = ConsentParams {
let p = ConsentParams #{
initial_request: 1000000,
confirmation: 1100000,
ip_address: "192.168.1.1",
Expand All @@ -170,7 +170,7 @@
}

pub fn test_verify_consent_simultaneous() -> Bool {
let p = ConsentParams {
let p = ConsentParams #{
initial_request: 1000000,
confirmation: 1000000,
ip_address: "192.168.1.1",
Expand Down
Loading