File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ require 'spec_helper'
2+
3+ describe ZendeskAPI ::Search do
4+ context ".new" do
5+ context "when given an existing class" do
6+ it "should return the correct class" do
7+ ZendeskAPI ::Search . new ( nil , { "result_type" => "user" } ) . should be_instance_of ( ZendeskAPI ::User )
8+ end
9+ end
10+
11+ context "when given a nonexistant class" do
12+ it "should return an object of the type Search::Result" do
13+ ZendeskAPI ::Search . new ( nil , { "result_type" => "blah" } ) . should be_instance_of ( ZendeskAPI ::Search ::Result )
14+ end
15+ end
16+
17+ context "when not given anything" do
18+ it "should return an object of the type Search::Result" do
19+ ZendeskAPI ::Search . new ( nil , { } ) . should be_instance_of ( ZendeskAPI ::Search ::Result )
20+ end
21+ end
22+ end
23+ end
You can’t perform that action at this time.
0 commit comments