|
141 | 141 | it "should return false for a provided search" do
|
142 | 142 | stub_api_get("/#{subject.class.element_name}/#{id}", 'saved_searches/get.json')
|
143 | 143 | resource = subject.class.find(id)
|
144 |
| - resource.stub(:is_provided_search?) { true } |
| 144 | + resource.stub(:provided_search?) { true } |
145 | 145 | resource.can_have_newsfeed?.should == false
|
146 | 146 | end
|
147 | 147 |
|
148 | 148 | it "should return false without at least three filter parameters" do
|
149 | 149 | stub_api_get("/#{subject.class.element_name}/#{id}", 'saved_searches/get.json')
|
150 | 150 | resource = subject.class.find(id)
|
151 |
| - resource.stub(:is_provided_search?) { false } |
| 151 | + resource.stub(:provided_search?) { false } |
152 | 152 | resource.stub(:has_active_newsfeed?) { false }
|
153 | 153 | resource.stub(:has_inactive_newsfeed?) { false }
|
154 | 154 | resource.Filter = "City Eq 'Moorhead' And MlsStatus Eq 'Active'"
|
|
158 | 158 | it "should return true with three filter parameters" do
|
159 | 159 | stub_api_get("/#{subject.class.element_name}/#{id}", 'saved_searches/get.json')
|
160 | 160 | resource = subject.class.find(id)
|
161 |
| - resource.stub(:is_provided_search?) { false } |
| 161 | + resource.stub(:provided_search?) { false } |
162 | 162 | resource.stub(:has_active_newsfeed?) { false }
|
163 | 163 | resource.stub(:has_inactive_newsfeed?) { false }
|
164 | 164 | resource.can_have_newsfeed?.should == true
|
|
172 | 172 | stub_api_get("/#{subject.class.element_name}/#{id}", 'saved_searches/with_newsfeed.json',
|
173 | 173 | { "_expand" => "NewsFeedSubscriptionSummary" } )
|
174 | 174 | resource = subject.class.find(id)
|
175 |
| - resource.stub(:is_provided_search?) { false } |
| 175 | + resource.stub(:provided_search?) { false } |
176 | 176 | resource.has_active_newsfeed?.should == true
|
177 | 177 | end
|
178 | 178 |
|
179 | 179 | it "should return false for a provided search" do
|
180 | 180 | stub_api_get("/#{subject.class.element_name}/#{id}", 'saved_searches/get.json')
|
181 | 181 | resource = subject.class.find(id)
|
182 |
| - resource.stub(:is_provided_search?) { true } |
| 182 | + resource.stub(:provided_search?) { true } |
183 | 183 | resource.has_active_newsfeed?.should == false
|
184 | 184 | end
|
185 | 185 | end
|
|
190 | 190 | stub_api_get("/#{subject.class.element_name}/#{id}", 'saved_searches/with_inactive_newsfeed.json',
|
191 | 191 | { "_expand" => "NewsFeedSubscriptionSummary" } )
|
192 | 192 | resource = subject.class.find(id)
|
193 |
| - resource.stub(:is_provided_search?) { false } |
| 193 | + resource.stub(:provided_search?) { false } |
194 | 194 | resource.has_inactive_newsfeed?.should == true
|
195 | 195 | end
|
196 | 196 |
|
197 | 197 | it "should return false for a provided search" do
|
198 | 198 | stub_api_get("/#{subject.class.element_name}/#{id}", 'saved_searches/with_inactive_newsfeed.json')
|
199 | 199 | resource = subject.class.find(id)
|
200 |
| - resource.stub(:is_provided_search?) { true } |
| 200 | + resource.stub(:provided_search?) { true } |
201 | 201 | resource.has_inactive_newsfeed?.should == false
|
202 | 202 | end
|
203 | 203 | end
|
|
0 commit comments