spec 清理
This commit is contained in:
parent
49d836d331
commit
d546069051
|
@ -1,5 +0,0 @@
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe ForumObserver do
|
|
||||||
pending "add some examples to (or delete) #{__FILE__}"
|
|
||||||
end
|
|
|
@ -1,5 +0,0 @@
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe MemoObserver do
|
|
||||||
pending "add some examples to (or delete) #{__FILE__}"
|
|
||||||
end
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue