I am new in rails testing and I have written an integration test for user signup. Test is working fine but it is not inserting record in the database.
Here is the code
require 'test_helper'
class SignupTest < ActionDispatch::IntegrationTest
test "user signup" do
visit new_user_registration_path
fill_in "user_email", with: "abc@gmail.com"
fill_in "user_password", with: "password"
fill_in "user_password_confirmation", with: "password"
click_button "Sign up"
assert_text "Welcome! You have signed up successfully."
end
end
This is the command that I am using to run the test
rake test:integration
When I run the test the results are
Run options: --seed 62721
# Running:
.
Finished in 3.116669s, 0.3209 runs/s, 0.3209 assertions/s.
1 runs, 1 assertions, 0 failures, 0 errors, 0 skips
I have also checked the logs but nothing in the log.
This is my gemlist for testing
group :test do
gem 'capybara'
gem 'capybara-webkit'
gem 'vcr'
gem 'webmock'
gem 'launchy'
end