mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
Create AdminContactsTest
This commit is contained in:
parent
255706fb45
commit
a6a99df58e
2 changed files with 29 additions and 12 deletions
29
test/integration/admin/contacts_test.rb
Normal file
29
test/integration/admin/contacts_test.rb
Normal file
|
@ -0,0 +1,29 @@
|
|||
require 'test_helper'
|
||||
|
||||
class AdminContactsTest < ActionDispatch::IntegrationTest
|
||||
def setup
|
||||
super
|
||||
|
||||
@contact = contacts(:william)
|
||||
login_as users(:admin)
|
||||
end
|
||||
|
||||
def teardown
|
||||
super
|
||||
end
|
||||
|
||||
def test_display_list
|
||||
visit admin_contacts_path
|
||||
|
||||
assert_text('william-001')
|
||||
assert_text('william-002')
|
||||
assert_text('acme-ltd-001')
|
||||
end
|
||||
|
||||
def test_display_details
|
||||
visit admin_contact_path(@contact)
|
||||
|
||||
assert_text('Street Main Street City New York Postcode 12345 ' \
|
||||
'State New York Country United States of America')
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue