Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor EWSClient changes: added accessors, fixed variables, added test
- Loading branch information
Showing
2 changed files
with
36 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
require "spec_helper" | ||
|
||
describe Viewpoint::EWSClient do | ||
|
||
describe "#set_auto_deepen" do | ||
let(:client) { described_class.new "http://www.example.com", "test", "test" } | ||
|
||
it "sets autodeepen to true on the web service" do | ||
ews = double "ews" | ||
expect(ews).to receive(:auto_deepen=).with(true) {true} | ||
expect(client).to receive(:ews) {ews} | ||
client.set_auto_deepen true | ||
end | ||
|
||
it "sets autodeepen to false on the web service with a behavior of 'raise'" do | ||
ews = double "ews" | ||
expect(ews).to receive(:no_auto_deepen_behavior=).with(:raise) {:raise} | ||
expect(ews).to receive(:auto_deepen=).with(false) {false} | ||
expect(client).to receive(:ews).twice {ews} | ||
client.set_auto_deepen false | ||
end | ||
|
||
end | ||
|
||
end |