Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions spec_integration/spec/webapi_integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,21 @@
end
end

# describe 'update' do
# before do
# comment_params[:comment] = "webapi sample message 2"
# end
# it 'update api not allowed' do
# res = WebAPIClient::Comment.update(comment["id"], comment_params)
# expect(res["code"]).to eq 405
# end
# end

# describe 'delete' do
# it 'delete api not allowed' do
# res = WebAPIClient::Comment.delete(comment["id"])
# expect(res["code"]).to eq 405
# end
# end
#delete comment
describe 'update' do
before do
comment_params[:comment] = "webapi sample message 2"
end
it 'update api not allowed' do
res = WebAPIClient::Comment.update(comment["id"], comment_params)
expect(res["code"]).to eq 405
end
end

describe 'delete' do
it 'delete api not allowed' do
res = WebAPIClient::Comment.delete(comment["id"])
expect(res["code"]).to eq 405
end
end
end
3 changes: 2 additions & 1 deletion webapi/config-webapi.ru
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
# Hello World!

$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)

Expand Down Expand Up @@ -32,4 +33,4 @@ map '/api' do
map '/0.0.1' do
run Webapi::Endpoints::V001::Webapi.new
end
end
end