From 90ef5250bb05ecc01a37f0f3622cc66afd14e283 Mon Sep 17 00:00:00 2001 From: yafeilee Date: Mon, 31 Mar 2014 12:58:59 +0800 Subject: [PATCH] =?UTF-8?q?post=5Flist=20FactoryGirl=20=E5=BC=95=E5=8F=91?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spec/controllers/blogs_controller_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/controllers/blogs_controller_spec.rb b/spec/controllers/blogs_controller_spec.rb index 41c3c3d..2d2830a 100644 --- a/spec/controllers/blogs_controller_spec.rb +++ b/spec/controllers/blogs_controller_spec.rb @@ -66,18 +66,18 @@ describe BlogsController do it "#prev, #next" do posts = create_list(:post_list, 3) selected = posts[1] - s_prev = posts[0] - s_next = posts[2] + s_prev = posts[2] + s_next = posts[1] get :show, id: selected.id expect(assigns(:prev)).to eq(s_prev) expect(assigns(:next)).to eq(s_next) - selected = posts[0] + selected = posts[2] get :show, id: selected.id expect(assigns(:prev)).to be_nil expect(assigns(:next)).to eq(posts[1]) - selected = posts[2] + selected = posts[0] get :show, id: selected.id expect(assigns(:prev)).to eq(posts[1]) expect(assigns(:next)).to be_nil