From 237d6858d43d010364b648e71d5516f12b6e7f4d Mon Sep 17 00:00:00 2001 From: Neil Smith Date: Tue, 7 Jan 2014 09:46:11 +0000 Subject: [PATCH] More tinkering with feed controller spec --- spec/controllers/feed_controller_spec.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/spec/controllers/feed_controller_spec.rb b/spec/controllers/feed_controller_spec.rb index c2b71a4..9e75e8c 100644 --- a/spec/controllers/feed_controller_spec.rb +++ b/spec/controllers/feed_controller_spec.rb @@ -8,7 +8,6 @@ describe FeedController do it "responds successfully with an HTTP 200 status code" do get :index expect(response).to be_success - expect(response.status).to eq(200) end it "renders the index template" do @@ -33,15 +32,19 @@ describe FeedController do expect(response).to redirect_to(index_path) end + it "does not redirect an emtpy rss document for an empty feed" do + get :show, feed_name: "empty_feed", format: "rss" + expect(response).to be_success + end + it "returns an emtpy rss document for an empty feed" do get :show, feed_name: "empty_feed", format: "rss" - expect(response.status).to be(200) + expect(assigns(:feed_items)).to be_empty end it "responds successfully with an HTTP 200 status code" do get :show, feed_name: "test_feed" expect(response).to be_success - expect(response.status).to eq(200) end it "renders the index template" do -- 2.34.1