File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 95
95
expect ( response . body ) . to eq '{"richMenuId":"7654321"}'
96
96
end
97
97
98
+ it 'set a default rich menu' do
99
+ uri_template = Addressable ::Template . new Line ::Bot ::API ::DEFAULT_ENDPOINT + '/bot/user/all/richmenu/7654321'
100
+ stub_request ( :post , uri_template ) . to_return ( body : '{}' , status : 200 )
101
+
102
+ client . set_default_rich_menu ( '7654321' )
103
+ expect ( WebMock ) . to have_requested ( :post , Line ::Bot ::API ::DEFAULT_ENDPOINT + '/bot/user/all/richmenu/7654321' )
104
+ end
105
+
106
+ it 'unset a default rich menu' do
107
+ uri_template = Addressable ::Template . new Line ::Bot ::API ::DEFAULT_ENDPOINT + '/bot/user/all/richmenu'
108
+ stub_request ( :delete , uri_template ) . to_return ( body : '{}' , status : 200 )
109
+
110
+ client . unset_default_rich_menu ( )
111
+ expect ( WebMock ) . to have_requested ( :delete , Line ::Bot ::API ::DEFAULT_ENDPOINT + '/bot/user/all/richmenu' )
112
+ end
113
+
98
114
it 'links a rich menu to a user' do
99
115
uri_template = Addressable ::Template . new Line ::Bot ::API ::DEFAULT_ENDPOINT + '/bot/user/1234567/richmenu/7654321'
100
116
stub_request ( :post , uri_template ) . to_return ( body : '{}' , status : 200 )
You can’t perform that action at this time.
0 commit comments