25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/v2/test/test_users.rb', line 25
def test_users
print '> input your Pushbullet access token: '
input = STDIN.noecho(&:gets)
assert_not_nil(input)
access_token = input.chomp
Pushbullet.set_access_token(access_token)
info = Pushbullet::V2::Users.me
assert_not_nil(info)
test_flag = 'test_flag'
test_value = 'this is a flag for testing'
updated = Pushbullet::V2::Users.update_my_preferences({test_flag => test_value})
assert_not_nil(updated)
assert_equal(updated['preferences'][test_flag], test_value)
assert_not_nil(Pushbullet::V2::Users.update_my_preferences(info['preferences']))
end
|