diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-01-04 12:24:42 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2013-01-04 12:24:42 +1100 |
commit | fc326e9b3d1750c28cacd680d944c8bed302bc61 (patch) | |
tree | 83b169b7935a58343e10e5433d0106918931740c | |
parent | c8de5ff799bb282a586185dbc6c86dad412e6204 (diff) |
No need to specify extension when testing particular template is rendered
-rw-r--r-- | spec/controllers/api_controller_spec.rb | 4 | ||||
-rw-r--r-- | spec/controllers/request_controller_spec.rb | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/spec/controllers/api_controller_spec.rb b/spec/controllers/api_controller_spec.rb index aeb452afe..8dc8e2990 100644 --- a/spec/controllers/api_controller_spec.rb +++ b/spec/controllers/api_controller_spec.rb @@ -286,7 +286,7 @@ describe ApiController, "when using the API" do :feed_type => "atom" response.should be_success - response.should render_template("api/request_events.atom") + response.should render_template("api/request_events") assigns[:events].size.should > 0 assigns[:events].each do |event| event.info_request.public_body.should == public_bodies(:geraldine_public_body) @@ -341,7 +341,7 @@ describe ApiController, "when using the API" do :feed_type => "atom" response.should be_success - response.should render_template("api/request_events.atom") + response.should render_template("api/request_events") assigns[:events].size.should > 0 assigns[:events].each do |event| event.created_at.should >= Date.new(2010, 1, 1) diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index 9e14153a7..6b5e3e216 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -2090,20 +2090,20 @@ describe RequestController, "when doing type ahead searches" do it "should return nothing for the empty query string" do get :search_typeahead, :q => "" - response.should render_template('request/_search_ahead.rhtml') + response.should render_template('request/_search_ahead') assigns[:xapian_requests].should be_nil end it "should return a request matching the given keyword, but not users with a matching description" do get :search_typeahead, :q => "chicken" - response.should render_template('request/_search_ahead.rhtml') + response.should render_template('request/_search_ahead') assigns[:xapian_requests].results.size.should == 1 assigns[:xapian_requests].results[0][:model].title.should == info_requests(:naughty_chicken_request).title end it "should return all requests matching any of the given keywords" do get :search_typeahead, :q => "money dog" - response.should render_template('request/_search_ahead.rhtml') + response.should render_template('request/_search_ahead') assigns[:xapian_requests].results.map{|x|x[:model].info_request}.should =~ [ info_requests(:fancy_dog_request), info_requests(:naughty_chicken_request), @@ -2113,13 +2113,13 @@ describe RequestController, "when doing type ahead searches" do it "should not return matches for short words" do get :search_typeahead, :q => "a" - response.should render_template('request/_search_ahead.rhtml') + response.should render_template('request/_search_ahead') assigns[:xapian_requests].should be_nil end it "should do partial matches for longer words" do get :search_typeahead, :q => "chick" - response.should render_template('request/_search_ahead.rhtml') + response.should render_template('request/_search_ahead') assigns[:xapian_requests].results.size.should ==1 end |