#215 テスト・ケース追加
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
module AuthHelper
|
||||
def sign_in_as(user)
|
||||
allow_any_instance_of(ApplicationController)
|
||||
.to receive(:current_user).and_return(user)
|
||||
end
|
||||
|
||||
def sign_out
|
||||
allow_any_instance_of(ApplicationController)
|
||||
.to receive(:current_user).and_return(nil)
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
module JsonHelper
|
||||
def json
|
||||
JSON.parse(response.body)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user