Skip to content

Commit

Permalink
Merge pull request #206 from yskkin/disallow_net_connect
Browse files Browse the repository at this point in the history
disallow actual net connection during unit test
  • Loading branch information
kimoto authored Dec 16, 2020
2 parents 87a6cf1 + 86537a6 commit 30a3bc8
Show file tree
Hide file tree
Showing 18 changed files with 0 additions and 36 deletions.
2 changes: 0 additions & 2 deletions spec/line/bot/client_channel_token_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
}
EOS

WebMock.allow_net_connect!

describe Line::Bot::Client do
def dummy_config
{
Expand Down
2 changes: 0 additions & 2 deletions spec/line/bot/client_get_group_or_room_member_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
}
EOS

WebMock.allow_net_connect!

describe Line::Bot::Client do
before do
end
Expand Down
2 changes: 0 additions & 2 deletions spec/line/bot/client_get_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,6 @@
}
EOS

WebMock.allow_net_connect!

describe Line::Bot::Client do
before do
end
Expand Down
2 changes: 0 additions & 2 deletions spec/line/bot/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ def post(url, payload, header = {})
end
end

WebMock.allow_net_connect!

describe Line::Bot::Client do
def dummy_config
{
Expand Down
2 changes: 0 additions & 2 deletions spec/line/bot/link_token_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
}
EOS

WebMock.allow_net_connect!

describe Line::Bot::Client do
let(:client) do
dummy_config = {
Expand Down
2 changes: 0 additions & 2 deletions spec/line/bot/rich_menu_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
RICH_MENU_IMAGE_FILE_PATH = 'spec/fixtures/line/bot/rich_menu_01.png'
RICH_MENU_INVALID_FILE_EXTENSION_PATH = 'spec/fixtures/line/bot/rich_menu_01.txt'

WebMock.allow_net_connect!

describe Line::Bot::Client do
let(:client) do
dummy_config = {
Expand Down
2 changes: 0 additions & 2 deletions spec/line/bot/send_message_01_text_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
require 'webmock/rspec'
require 'json'

WebMock.allow_net_connect!

describe Line::Bot::Client do
it 'pushes the text message' do
uri_template = Addressable::Template.new Line::Bot::API::DEFAULT_ENDPOINT + '/bot/message/push'
Expand Down
2 changes: 0 additions & 2 deletions spec/line/bot/send_message_02_image_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
require 'webmock/rspec'
require 'json'

WebMock.allow_net_connect!

describe Line::Bot::Client do
it 'pushes the image message' do
uri_template = Addressable::Template.new Line::Bot::API::DEFAULT_ENDPOINT + '/bot/message/push'
Expand Down
2 changes: 0 additions & 2 deletions spec/line/bot/send_message_03_video_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
require 'webmock/rspec'
require 'json'

WebMock.allow_net_connect!

describe Line::Bot::Client do
it 'pushes the video message' do
uri_template = Addressable::Template.new Line::Bot::API::DEFAULT_ENDPOINT + '/bot/message/push'
Expand Down
2 changes: 0 additions & 2 deletions spec/line/bot/send_message_04_audio_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
require 'webmock/rspec'
require 'json'

WebMock.allow_net_connect!

describe Line::Bot::Client do
it 'pushes the audio message' do
uri_template = Addressable::Template.new Line::Bot::API::DEFAULT_ENDPOINT + '/bot/message/push'
Expand Down
2 changes: 0 additions & 2 deletions spec/line/bot/send_message_05_location_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
require 'webmock/rspec'
require 'json'

WebMock.allow_net_connect!

describe Line::Bot::Client do
it 'pushes the location message' do
uri_template = Addressable::Template.new Line::Bot::API::DEFAULT_ENDPOINT + '/bot/message/push'
Expand Down
2 changes: 0 additions & 2 deletions spec/line/bot/send_message_06_sticker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
require 'webmock/rspec'
require 'json'

WebMock.allow_net_connect!

describe Line::Bot::Client do
it 'pushes the sticker message' do
uri_template = Addressable::Template.new Line::Bot::API::DEFAULT_ENDPOINT + '/bot/message/push'
Expand Down
2 changes: 0 additions & 2 deletions spec/line/bot/send_message_07_imagemap_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
require 'webmock/rspec'
require 'json'

WebMock.allow_net_connect!

describe Line::Bot::Client do
it 'pushes the imagemap message' do
uri_template = Addressable::Template.new Line::Bot::API::DEFAULT_ENDPOINT + '/bot/message/push'
Expand Down
2 changes: 0 additions & 2 deletions spec/line/bot/send_message_08_image_carousel_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
require 'webmock/rspec'
require 'json'

WebMock.allow_net_connect!

describe Line::Bot::Client do
it 'pushes the image carousel message' do
uri_template = Addressable::Template.new Line::Bot::API::DEFAULT_ENDPOINT + '/bot/message/push'
Expand Down
2 changes: 0 additions & 2 deletions spec/line/bot/send_message_11_template_buttons_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
require 'webmock/rspec'
require 'json'

WebMock.allow_net_connect!

describe Line::Bot::Client do
it 'pushes the template message type buttons' do
uri_template = Addressable::Template.new Line::Bot::API::DEFAULT_ENDPOINT + '/bot/message/push'
Expand Down
2 changes: 0 additions & 2 deletions spec/line/bot/send_message_12_template_confirm_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
require 'webmock/rspec'
require 'json'

WebMock.allow_net_connect!

describe Line::Bot::Client do
it 'pushes the template message type confirm' do
uri_template = Addressable::Template.new Line::Bot::API::DEFAULT_ENDPOINT + '/bot/message/push'
Expand Down
2 changes: 0 additions & 2 deletions spec/line/bot/send_message_13_template_carousel_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
require 'webmock/rspec'
require 'json'

WebMock.allow_net_connect!

describe Line::Bot::Client do
it 'pushes the template message type carousel' do
uri_template = Addressable::Template.new Line::Bot::API::DEFAULT_ENDPOINT + '/bot/message/push'
Expand Down
2 changes: 0 additions & 2 deletions spec/line/bot/send_message_14_template_datepicker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
require 'webmock/rspec'
require 'json'

WebMock.allow_net_connect!

describe Line::Bot::Client do
it 'pushes the template message type datepicker' do
uri_template = Addressable::Template.new Line::Bot::API::DEFAULT_ENDPOINT + '/bot/message/push'
Expand Down

0 comments on commit 30a3bc8

Please sign in to comment.