修正需要登录的admin测试错误

This commit is contained in:
yafeilee 2014-04-01 09:34:31 +08:00
parent 691c5dd40d
commit 9dc1ad2ad9
3 changed files with 10 additions and 0 deletions

View File

@ -2,6 +2,9 @@ require 'spec_helper'
describe Admin::DashboardController do
before do
session[:login] = true
end
describe "GET 'index'" do
it "returns http success" do
get 'index'

View File

@ -1,6 +1,10 @@
require 'spec_helper'
describe Admin::PostsController do
before do
session[:login] = true
end
it "preview should return ok" do
post :preview
response.body.should == ""

View File

@ -2,6 +2,9 @@ require 'spec_helper'
describe Admin::SessionsController do
before do
session[:login] = true
end
describe "GET 'new'" do
it "returns http success" do
get 'new'