about summary refs log tree commit diff stats
path: root/tests/otr
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-02-23 21:20:41 +0000
committerJames Booth <boothj5@gmail.com>2014-02-23 21:20:41 +0000
commitc00376087f2ea0060b40d6adc1ef81ef17d8868a (patch)
treecc18959ae2b7fa40a4b778fd0132b94d83271a19 /tests/otr
parentda058359ac552bc90e7b70749d5f96289434a9c8 (diff)
downloadprofani-tty-c00376087f2ea0060b40d6adc1ef81ef17d8868a.tar.gz
Test /otr start sends OTR query message to current recipient
Diffstat (limited to 'tests/otr')
-rw-r--r--tests/otr/mock_otr.c13
-rw-r--r--tests/otr/mock_otr.h2
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/otr/mock_otr.c b/tests/otr/mock_otr.c
index 64ec1166..0cda802e 100644
--- a/tests/otr/mock_otr.c
+++ b/tests/otr/mock_otr.c
@@ -40,6 +40,12 @@ _mock_otr_key_loaded(void)
     return (gboolean)mock();
 }
 
+static char *
+_mock_otr_start_query(void)
+{
+    return (char *)mock();
+}
+
 void
 otr_keygen_expect(ProfAccount *account)
 {
@@ -75,3 +81,10 @@ otr_key_loaded_returns(gboolean loaded)
     otr_key_loaded = _mock_otr_key_loaded;
     will_return(_mock_otr_key_loaded, loaded);
 }
+
+void
+otr_start_query_returns(char *query)
+{
+    otr_start_query = _mock_otr_start_query;
+    will_return(_mock_otr_start_query, query);
+}
diff --git a/tests/otr/mock_otr.h b/tests/otr/mock_otr.h
index 742fb215..ab28ed6c 100644
--- a/tests/otr/mock_otr.h
+++ b/tests/otr/mock_otr.h
@@ -11,4 +11,6 @@ void otr_libotr_version_returns(char *version);
 void otr_get_my_fingerprint_returns(char *fingerprint);
 void otr_get_their_fingerprint_expect_and_return(char *recipient, char *fingerprint);
 
+void otr_start_query_returns(char *query);
+
 #endif
700 committer Kartik K. Agaram <vc@akkartik.com> 2022-06-02 17:46:30 -0700 more efficient undo/redo' href='/akkartik/view.love/commit/undo.lua?id=4f76ea37d7a24e6562fb8640935750c50de62e69'>4f76ea3 ^
007b965 ^
79a1241 ^
5b91af1 ^
79a1241 ^
5b91af1 ^
6708862 ^

5b91af1 ^


6708862 ^
4f76ea3 ^

6708862 ^


4f76ea3 ^
a655c21 ^
3547c18 ^
6708862 ^



4f76ea3 ^







007b965 ^
4f76ea3 ^


007b965 ^
4f76ea3 ^




29dac6a ^
007b965 ^
29dac6a ^


007b965 ^
29dac6a ^




6708862 ^











4f76ea3 ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110