Sha256: 2874d841ebd0d38cdb367d758e1216e771571918389c749f58ec51398f0d7048

Contents?: true

Size: 1020 Bytes

Versions: 51

Compression:

Stored size: 1020 Bytes

Contents

# frozen_string_literal: true

# we only want this file to monkey-patch zat when we shell out to it, but cucumber automatically requires it as well.
unless defined?(Cucumber)

  require 'webmock'

  WebMock::API.stub_request(:post, 'https://app-account.zendesk.com/api/v2/apps/uploads.json').to_return(body: JSON.dump(id: '123'))
  WebMock::API.stub_request(:post, 'https://app-account.zendesk.com/api/apps.json').with(body: JSON.dump(name: 'John Test App', upload_id: '123')).to_return(body: JSON.dump(job_id: '987'))
  WebMock::API.stub_request(:get, 'https://app-account.zendesk.com/api/v2/apps/job_statuses/987').to_return(body: JSON.dump(status: 'working')).then.to_return(body: JSON.dump(status: 'completed', app_id: '55'))
  WebMock::API.stub_request(:get, 'https://rubygems.org/api/v1/gems/zendesk_apps_tools.json').to_return(body: JSON.dump(status: 'working', version: '1.2.3')).then.to_return(body: JSON.dump(name: 'zendesk_apps_tools', version: '2.1.1'))

  WebMock.enable!
  WebMock.disable_net_connect!
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
zendesk_apps_tools-3.9.2 features/support/webmock.rb
zendesk_apps_tools-3.9.1 features/support/webmock.rb
zendesk_apps_tools-3.9.0 features/support/webmock.rb
zendesk_apps_tools-3.8.15.beta.3 features/support/webmock.rb
zendesk_apps_tools-3.8.15.beta.2 features/support/webmock.rb
zendesk_apps_tools-3.8.14 features/support/webmock.rb
zendesk_apps_tools-3.8.13 features/support/webmock.rb
zendesk_apps_tools-3.8.11 features/support/webmock.rb
zendesk_apps_tools-3.8.10 features/support/webmock.rb
zendesk_apps_tools-3.8.9 features/support/webmock.rb
zendesk_apps_tools-3.8.8 features/support/webmock.rb
zendesk_apps_tools-3.8.7 features/support/webmock.rb
zendesk_apps_tools-3.8.6 features/support/webmock.rb
zendesk_apps_tools-3.8.5 features/support/webmock.rb
zendesk_apps_tools-3.8.4 features/support/webmock.rb
zendesk_apps_tools-3.8.3 features/support/webmock.rb
zendesk_apps_tools-3.8.2 features/support/webmock.rb
zendesk_apps_tools-3.8.1 features/support/webmock.rb
zendesk_apps_tools-3.8.0 features/support/webmock.rb
zendesk_apps_tools-3.7.1 features/support/webmock.rb