{"size": 1315, "ext": "js", "max_stars_repo_path": "packages/client/__tests__/resources/v2/webhooks.test.js", "max_stars_repo_name": "Kapucryptocoin/core", "max_stars_repo_stars_event_min_datetime": "2018-08-28T00:01:13.000Z", "max_stars_repo_stars_event_max_datetime": "2020-02-13T17:35:17.000Z", "max_issues_repo_path": "packages/client/__tests__/resources/v2/webhooks.test.js", "max_issues_repo_name": "Kapucryptocoin/core", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "packages/client/__tests__/resources/v2/webhooks.test.js", "max_forks_repo_name": "Kapucryptocoin/core", "max_forks_repo_forks_event_min_datetime": "2018-09-18T14:03:36.000Z", "max_forks_repo_forks_event_max_datetime": "2019-02-25T22:22:08.000Z"}
{"max_stars_count": 7, "max_issues_count": null, "max_forks_count": 3, "avg_line_length": 23.9090909091, "max_line_length": 66, "alphanum_fraction": 0.6296577947}
const Client = require('../../../lib')
const ApiResource = require('../../../lib/resources/v2/webhooks')

const configureMocks = require('../../mocks/v2')
const host = 'https://example.net:4003'
configureMocks({ host })

let resource

beforeEach(() => {
  resource = (new Client(host)).setVersion(2).resource('webhooks')
})

describe('API - 2.0 - Resources - Blocks', () => {
  it('should be instantiated', () => {
    expect(resource).toBeInstanceOf(ApiResource)
  })

  it('should call "all" method', async () => {
    const response = await resource.all()

    expect(response.status).toBe(200)
  })

  it('should call "create" method', async () => {
    const response = await resource.create()

    expect(response.status).toBe(200)
  })

  it('should call "get" method', async () => {
    const response = await resource.get('123')

    expect(response.status).toBe(200)
  })

  it('should call "update" method', async () => {
    const response = await resource.update('123')

    expect(response.status).toBe(200)
  })

  it('should call "delete" method', async () => {
    const response = await resource.delete('123')

    expect(response.status).toBe(200)
  })

  it('should call "events" method', async () => {
    const response = await resource.events()

    expect(response.status).toBe(200)
  })
})
