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
|
# File 'lib/v2/test/test_subscriptions.rb', line 25
def test_subscriptions
print '> input your Pushbullet access token: '
input = STDIN.noecho(&:gets)
assert_not_nil(input)
access_token = input.chomp
Pushbullet.set_access_token(access_token)
channel_tag = 'pushbullet'
subscribed = Pushbullet::V2::Subscriptions.subscribe(channel_tag)
assert_not_nil(subscribed)
subscriptions = Pushbullet::V2::Subscriptions.get
assert_not_nil(subscriptions)
subscribed = subscriptions['subscriptions'].first
assert_not_nil(Pushbullet::V2::Subscriptions.channel_info(subscribed['channel']['tag']))
assert_not_nil(Pushbullet::V2::Subscriptions.unsubscribe(subscribed['iden']))
end
|