我正在尝试测试我的<https://github.com/intridea/omniauth” rel=“nofollow”>OmniAuthlogin过程,在请求 用户——管理。 网络-步骤.rb 页: 1 成果/auth/facebook
时提供微薄认证薄膜,如:here和
Feature: User management
@omniauth_test
Scenario: Login
Given a user exists
And that user is signed in
...
And /^that user is signed in$/ do
visit "/auth/facebook"
end
...
Before( @omniauth_test ) do
OmniAuth.config.test_mode = true
p "OmniAuth.config.test_mode is #{OmniAuth.config.test_mode}"
# the symbol passed to mock_auth is the same as the name of the provider set up in the initializer
OmniAuth.config.mock_auth[:facebook] = {
"provider"=>"facebook",
"uid"=>"uid",
"user_info"=>{"email"=>"[email protected]", "first_name"=>"Test", "last_name"=>"User", "name"=>"Test User"}
}
end
After( @omniauth_test ) do
OmniAuth.config.test_mode = false
end
Feature: User management
@omniauth_test
Scenario: Login # features/用户——管理。:3
"OmniAuth.config.test_mode is true"
Given a user exists # features/step_definitions/pickle_steps.rb:4
And that user is signed in # features/step_definitions/网络-步骤.rb:40
No route matches [GET] "/auth/facebook" (ActionController::RoutingError)
./features/step_definitions/网络-步骤.rb:41:in `/^that user is signed in$/
features/testing.feature:5:in `And that user is signed in
Are there database testing tools for python (like sqlunit)? I want to test the DAL that is built using sqlalchemy