forked from fixin.me/fixin.me
Refine tests
This commit is contained in:
parent
7cfa3a0af0
commit
651534134e
2
test/fixtures/units.yml
vendored
2
test/fixtures/units.yml
vendored
@ -34,7 +34,7 @@ mg:
|
||||
name: milligram
|
||||
multiplier: 0.001
|
||||
base: g
|
||||
g:
|
||||
g_alice:
|
||||
user: alice
|
||||
symbol: g
|
||||
name: gram
|
||||
|
@ -36,7 +36,6 @@ class UnitsTest < ApplicationSystemTestCase
|
||||
end
|
||||
end
|
||||
|
||||
assert_current_path units_path
|
||||
within('tbody') do
|
||||
assert_no_selector :fillable_field
|
||||
assert_selector 'tr', count: @user.units.count
|
||||
|
@ -84,6 +84,8 @@ class UsersTest < ApplicationSystemTestCase
|
||||
with: users.reject(&:confirmed?).sample.email
|
||||
assert_emails 1 do
|
||||
click_on t(:resend_confirmation)
|
||||
# Wait until redirected to make sure async request has been processed
|
||||
assert_current_path new_user_session_path
|
||||
end
|
||||
assert_current_path new_user_session_path
|
||||
assert_text t("devise.confirmations.send_instructions")
|
||||
@ -138,8 +140,7 @@ class UsersTest < ApplicationSystemTestCase
|
||||
end
|
||||
|
||||
test "delete profile" do
|
||||
user = users.select(&:confirmed?).sample
|
||||
sign_in user: user
|
||||
user = sign_in
|
||||
# TODO: remove condition after root_url changed to different path than
|
||||
# profile in routes.rb
|
||||
unless has_current_path?(edit_user_registration_path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user