Skip to content

Commit b8697b8

Browse files
fix validate rich menu method name
1 parent 239b2ef commit b8697b8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/line/bot/client.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -547,12 +547,12 @@ def create_rich_menu(rich_menu)
547547
post(endpoint, endpoint_path, rich_menu.to_json, credentials)
548548
end
549549

550-
# Validate a rich menu
550+
# Validate a rich menu object
551551
#
552552
# @param rich_menu [Hash] The rich menu represented as a rich menu object
553553
#
554554
# @return [Net::HTTPResponse]
555-
def validate_rich_menu(rich_menu)
555+
def validate_rich_menu_object(rich_menu)
556556
channel_token_required
557557

558558
endpoint_path = '/bot/richmenu/validate'

spec/line/bot/rich_menu_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@
9595
.with(body: JSON.parse(RICH_MENU_CONTENT).to_json)
9696
end
9797

98-
it 'validates a rich menu' do
98+
it 'validates a rich menu object' do
9999
uri_template = Addressable::Template.new Line::Bot::API::DEFAULT_ENDPOINT + '/bot/richmenu/validate'
100100
stub_request(:post, uri_template).to_return(body: '{}', status: 200)
101101

102-
client.validate_rich_menu(JSON.parse(RICH_MENU_CONTENT))
102+
client.validate_rich_menu_object(JSON.parse(RICH_MENU_CONTENT))
103103
expect(WebMock).to have_requested(:post, Line::Bot::API::DEFAULT_ENDPOINT + '/bot/richmenu/validate')
104104
end
105105

0 commit comments

Comments
 (0)