internetee-registry/test/system/registrant_area/layout_test.rb
Maciej Szlosarczyk 526a9ccd58
Change test structure to follow closer newer Rails 5 rules
* Create new class called ApplicationIntegrationTest, so we don't have
  to override ActionDispatch::IntegrationTest
* Move UI tests to inherit from ApplicationSystemTestCase
* Existing REST API or EPP tests inherit from
  ApplicationIntegrationTest.
* Move `require 'application_system_test_case'` at the end of
  `test_helper`

I don't particularly agree with the Rails' convention of treating UI
tests as system tests and API tests as integration tests, but I see no
benefit in actively fighting against it.
2018-07-27 09:36:27 +03:00

24 lines
512 B
Ruby

require 'test_helper'
class RegistrantLayoutTest < ApplicationSystemTestCase
def setup
super
sign_in(users(:registrant))
Setting.days_to_keep_business_registry_cache = 1
travel_to Time.zone.parse('2010-07-05')
end
def teardown
super
travel_back
end
def test_has_link_to_rest_whois_and_internet_ee
visit registrant_domains_url
assert(has_link?('Internet.ee', href: 'https://internet.ee'))
assert(has_link?('WHOIS', href: 'https://whois.internet.ee'))
end
end