~tristan957/harvest-almanac

ref: 8aa3cb1e48a9fab71ab7c3c6131eed3ed426b5bd harvest-almanac/harvest-glib/tests/user.c -rw-r--r-- 502 bytes
8aa3cb1eTristan Partin I have no clue why this worked (send help) 1 year, 5 months ago
                                                                                
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
#include "init.h"

#include <glib.h>
#include <libsoup/soup.h>

#include "harvest-glib/http/api/harvest-api-client.h"
#include "harvest-glib/user/harvest-user.h"

static HarvestApiClient *CLIENT;

static void
test_harvest_get_me(void)
{
	HarvestResponse *res = harvest_user_get_me(CLIENT);

	g_assert_null(res->err);
}

int
main(int argc, char **argv)
{
	g_test_init(&argc, &argv, NULL);

	CLIENT = initialize_environment();

	g_test_add_func("/user/me", test_harvest_get_me);

	return g_test_run();
}