bullhorn-rest 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +15 -0
- data/LICENSE.txt +22 -0
- data/README.md +117 -0
- data/Rakefile +1 -0
- data/bullhorn-rest.gemspec +26 -0
- data/lib/bullhorn/rest.rb +8 -0
- data/lib/bullhorn/rest/authentication.rb +79 -0
- data/lib/bullhorn/rest/client.rb +77 -0
- data/lib/bullhorn/rest/entities/appointment.rb +13 -0
- data/lib/bullhorn/rest/entities/appointment_attendee.rb +13 -0
- data/lib/bullhorn/rest/entities/base.rb +73 -0
- data/lib/bullhorn/rest/entities/business_sector.rb +13 -0
- data/lib/bullhorn/rest/entities/candidate.rb +13 -0
- data/lib/bullhorn/rest/entities/candidate_certification.rb +13 -0
- data/lib/bullhorn/rest/entities/candidate_education.rb +13 -0
- data/lib/bullhorn/rest/entities/candidate_reference.rb +13 -0
- data/lib/bullhorn/rest/entities/candidate_work_history.rb +13 -0
- data/lib/bullhorn/rest/entities/category.rb +13 -0
- data/lib/bullhorn/rest/entities/client_contact.rb +13 -0
- data/lib/bullhorn/rest/entities/client_corporation.rb +13 -0
- data/lib/bullhorn/rest/entities/corporate_user.rb +13 -0
- data/lib/bullhorn/rest/entities/corporation_department.rb +13 -0
- data/lib/bullhorn/rest/entities/country.rb +13 -0
- data/lib/bullhorn/rest/entities/custom_action.rb +13 -0
- data/lib/bullhorn/rest/entities/job_order.rb +13 -0
- data/lib/bullhorn/rest/entities/job_submission.rb +13 -0
- data/lib/bullhorn/rest/entities/note.rb +13 -0
- data/lib/bullhorn/rest/entities/note_entity.rb +13 -0
- data/lib/bullhorn/rest/entities/placement.rb +13 -0
- data/lib/bullhorn/rest/entities/placement_change_request.rb +13 -0
- data/lib/bullhorn/rest/entities/placement_commission.rb +13 -0
- data/lib/bullhorn/rest/entities/sendout.rb +13 -0
- data/lib/bullhorn/rest/entities/skill.rb +13 -0
- data/lib/bullhorn/rest/entities/specialty.rb +13 -0
- data/lib/bullhorn/rest/entities/state.rb +13 -0
- data/lib/bullhorn/rest/entities/task.rb +13 -0
- data/lib/bullhorn/rest/entities/tearsheet.rb +13 -0
- data/lib/bullhorn/rest/entities/tearsheet_recipient.rb +13 -0
- data/lib/bullhorn/rest/entities/time_unit.rb +13 -0
- data/lib/bullhorn/rest/version.rb +5 -0
- data/spec/bullhorn/rest/client_spec.rb +32 -0
- data/spec/bullhorn/rest/entities_spec.rb +69 -0
- data/spec/cassettes/Bullhorn_Rest_Client/authentication/when_username_and_password_set/authenticates.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/appointment/_appointments_returns_appointments.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/appointment_attendee/_appointment_attendees_returns_appointment_attendees.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/business_sector/_business_sectors_returns_business_sectors.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/candidate/_candidates_returns_candidates.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/candidate/_department_candidates_returns_candidates.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/candidate/_user_candidates_returns_candidates.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/candidate_certification/_candidate_certifications_returns_candidate_certifications.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/candidate_education/_candidate_educations_returns_candidate_educations.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/candidate_reference/_candidate_references_returns_candidate_references.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/candidate_work_history/_candidate_work_histories_returns_candidate_work_histories.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/category/_categories_returns_categories.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/client_contact/_client_contacts_returns_client_contacts.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/client_contact/_department_client_contacts_returns_client_contacts.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/client_contact/_user_client_contacts_returns_client_contacts.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/client_corporation/_client_corporations_returns_client_corporations.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/client_corporation/_department_client_corporations_returns_client_corporations.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/client_corporation/_user_client_corporations_returns_client_corporations.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/corporate_user/_corporate_users_returns_corporate_users.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/corporation_department/_corporation_departments_returns_corporation_departments.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/country/_countries_returns_countries.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/custom_action/_custom_actions_returns_custom_actions.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/job_order/_department_job_orders_returns_job_orders.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/job_order/_job_orders_returns_job_orders.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/job_order/_user_job_orders_returns_job_orders.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/job_submission/_job_submissions_returns_job_submissions.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/note/_department_notes_returns_notes.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/note/_notes_returns_notes.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/note/_user_notes_returns_notes.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/note_entity/_note_entities_returns_note_entities.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/placement/_department_placements_returns_placements.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/placement/_placements_returns_placements.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/placement/_user_placements_returns_placements.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/placement_change_request/_placement_change_requests_returns_placement_change_requests.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/placement_commission/_placement_commissions_returns_placement_commissions.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/sendout/_sendouts_returns_sendouts.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/skill/_skills_returns_skills.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/specialty/_specialties_returns_specialties.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/state/_states_returns_states.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/task/_tasks_returns_tasks.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/tearsheet/_tearsheets_returns_tearsheets.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/tearsheet_recipient/_tearsheet_recipients_returns_tearsheet_recipients.json +1 -0
- data/spec/cassettes/Bullhorn_Rest_Entities/time_unit/_time_units_returns_time_units.json +1 -0
- data/spec/spec_helper.rb +74 -0
- metadata +247 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Bullhorn::Rest::Client, :vcr do
|
4
|
+
|
5
|
+
let(:options) {{}}
|
6
|
+
let(:client) { Bullhorn::Rest::Client.new({client_id: test_bh_client_id, client_secret: test_bh_client_secret}.merge(options)) }
|
7
|
+
|
8
|
+
describe 'authentication' do
|
9
|
+
|
10
|
+
context 'when username and password set' do
|
11
|
+
|
12
|
+
let(:options) {{username: test_bh_username, password: test_bh_password}}
|
13
|
+
|
14
|
+
it 'authenticates' do
|
15
|
+
|
16
|
+
expect(client.auth_code).to be_nil
|
17
|
+
expect(client.access_token).to be_nil
|
18
|
+
expect(client.rest_token).to be_nil
|
19
|
+
|
20
|
+
client.authenticate
|
21
|
+
|
22
|
+
expect(client.auth_code).to_not be_nil
|
23
|
+
expect(client.access_token).to_not be_nil
|
24
|
+
expect(client.rest_token).to_not be_nil
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|