summary refs log tree commit diff stats
path: root/svc/conf.go
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-06-11 05:33:14 -0400
committerBen Morrison <ben@gbmor.dev>2019-06-11 05:33:14 -0400
commit1349bbc6e6627f357065602e085be762aab06383 (patch)
treecbcc0103606674cdd9826c970ed113e6d7b29341 /svc/conf.go
parent4ff0f5038aeca70ad76296ad3c9f054f4cfb5877 (diff)
downloadgetwtxt-1349bbc6e6627f357065602e085be762aab06383.tar.gz
push() changes v0.3.3
Diffstat (limited to 'svc/conf.go')
0 files changed, 0 insertions, 0 deletions
/tests/test_cmd_sub.c?id=c3fbaf8b2a75fc28df933e5f48fda2e8468b7e80'>^
976f3e30 ^

9537592b ^
976f3e30 ^


81190251 ^
976f3e30 ^
976f3e30 ^
0331cbe2 ^


0331cbe2 ^

9537592b ^
0331cbe2 ^
81190251 ^
0331cbe2 ^
81190251 ^
0331cbe2 ^
0331cbe2 ^
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








                      

                  
                       


                             

                      

                                                           

                             
                                                                   


                                                         
                                                   
                        
 


                                                  

                             
                                                                
 
                                                    
 
                                                   
                        
 
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>

#include "xmpp/xmpp.h"

#include "ui/ui.h"
#include "ui/stub_ui.h"

#include "command/commands.h"

#define CMD_SUB "/sub"

void cmd_sub_shows_message_when_not_connected(void **state)
{
    gchar *args[] = { NULL };

    will_return(jabber_get_connection_status, JABBER_DISCONNECTED);

    expect_cons_show("You are currently not connected.");

    gboolean result = cmd_sub(NULL, CMD_SUB, args);
    assert_true(result);
}

void cmd_sub_shows_usage_when_no_arg(void **state)
{
    gchar *args[] = { NULL };

    will_return(jabber_get_connection_status, JABBER_CONNECTED);

    expect_string(cons_bad_cmd_usage, cmd, CMD_SUB);

    gboolean result = cmd_sub(NULL, CMD_SUB, args);
    assert_true(result);
}