spec 清理

This commit is contained in:
guange 2015-05-16 09:59:14 +08:00
parent 49d836d331
commit d546069051
3 changed files with 2 additions and 12 deletions

View File

@ -1,5 +0,0 @@
require 'spec_helper'
describe ForumObserver do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -1,5 +0,0 @@
require 'spec_helper'
describe MemoObserver do
pending "add some examples to (or delete) #{__FILE__}"
end

View File

@ -56,7 +56,7 @@ RSpec.describe "课程", :type => :request do
resp = post upload_avatar_path(source_type: 'Course', source_id: course.id, format: :json),"avatar"=>{image: invalid_avatar} resp = post upload_avatar_path(source_type: 'Course', source_id: course.id, format: :json),"avatar"=>{image: invalid_avatar}
@o = ActiveSupport::JSON.decode(resp.body) @o = ActiveSupport::JSON.decode(resp.body)
end end
it "状态为0" do it "状态为0" do
expect(@o["status"]).not_to eq(0) expect(@o["status"]).not_to eq(0)
end end
it "要回传错误信息" do it "要回传错误信息" do
@ -74,7 +74,7 @@ RSpec.describe "课程", :type => :request do
resp = post upload_avatar_path(source_type: 'Course', source_id: course.id, format: :json),'avatar[image]'=> big_file resp = post upload_avatar_path(source_type: 'Course', source_id: course.id, format: :json),'avatar[image]'=> big_file
@o = ActiveSupport::JSON.decode(resp.body) @o = ActiveSupport::JSON.decode(resp.body)
end end
it "状态为0" do it "状态为0" do
expect(@o["status"]).not_to eq(0) expect(@o["status"]).not_to eq(0)
end end
it "要回传错误信息" do it "要回传错误信息" do