Skip to content

Commit

Permalink
Add tests for client#update_application
Browse files Browse the repository at this point in the history
  • Loading branch information
RoxasShadow committed Jul 31, 2017
1 parent 0e26bdd commit 177ee6f
Show file tree
Hide file tree
Showing 4 changed files with 172 additions and 0 deletions.
44 changes: 44 additions & 0 deletions spec/fixtures/cassettes/client/update_application.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions spec/greenhouse_io/api/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,50 @@
end
end

describe "#update_application" do
it "update the specified application" do
VCR.use_cassette('client/update_application') do
update_application = @client.update_application(
64087658,
{
source_id: 130370
},
509925
)
expect(update_application).to_not be_nil
expect(update_application[:source][:id]).to eq 130370
end
end

it "errors when given invalid On-Behalf-Of id" do
VCR.use_cassette('client/update_application_invalid_on_behalf_of') do
expect {
@client.update_application(
64087658,
{
source_id: 130370
},
101010
)
}.to raise_error(GreenhouseIo::Error)
end
end

it "errors when given an invalid application id" do
VCR.use_cassette('client/update_application_invalid_candidate_id') do
expect {
@client.update_application(
1010101,
{
source_id: 130370
},
509925
)
}.to raise_error(GreenhouseIo::Error)
end
end
end

describe "#scorecards" do
before do
VCR.use_cassette('client/scorecards') do
Expand Down

0 comments on commit 177ee6f

Please sign in to comment.