File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ def credentials
6262 # @param grant_type [String] Grant type
6363 #
6464 # @return [Net::HTTPResponse]
65- def issue_access_token ( grant_type = 'client_credentials' )
65+ def issue_channel_token ( grant_type = 'client_credentials' )
6666 payload = URI . encode_www_form (
6767 grant_type : grant_type ,
6868 client_id : channel_id ,
@@ -83,7 +83,7 @@ def issue_access_token(grant_type = 'client_credentials')
8383 # Revoke channel access token
8484 #
8585 # @return [Net::HTTPResponse]
86- def revoke_access_token ( access_token )
86+ def revoke_channel_token ( access_token )
8787 payload = URI . encode_www_form ( access_token : access_token )
8888
8989 request = Request . new do |config |
Original file line number Diff line number Diff line change 22require 'webmock/rspec'
33require 'json'
44
5- OAUTH_ACCESS_TOKEN_ISSUE_CONTENT = <<"EOS"
5+ OAUTH_CHANNEL_TOKEN_ISSUE_CONTENT = <<"EOS"
66{
77 "access_token": "W1TeHCgfH2Liwaxxxxx1",
88 "expires_in": 2592000,
@@ -29,10 +29,10 @@ def generate_client
2929
3030 it 'issues an oauth access token' do
3131 uri_template = Addressable ::Template . new Line ::Bot ::API ::DEFAULT_ENDPOINT + '/oauth/accessToken'
32- stub_request ( :post , uri_template ) . to_return { |request | { body : OAUTH_ACCESS_TOKEN_ISSUE_CONTENT , status : 200 } }
32+ stub_request ( :post , uri_template ) . to_return { |request | { body : OAUTH_CHANNEL_TOKEN_ISSUE_CONTENT , status : 200 } }
3333
3434 client = generate_client
35- response = client . issue_access_token
35+ response = client . issue_channel_token
3636
3737 expect ( response ) . to be_a ( Net ::HTTPOK )
3838 result = JSON . parse ( response . body )
@@ -47,7 +47,7 @@ def generate_client
4747
4848 client = generate_client
4949
50- response = client . revoke_access_token ( 'W1TeHCgfH2Liwaxxxxx1' )
50+ response = client . revoke_channel_token ( 'W1TeHCgfH2Liwaxxxxx1' )
5151
5252 expect ( response ) . to be_a ( Net ::HTTPOK )
5353 end
You can’t perform that action at this time.
0 commit comments