You are here

public function RestrictByIpUITests::testLoginByIpSettingsSubmit in Restrict Login or Role Access by IP Address 7.3

File

./restrict_by_ip.test, line 435

Class

RestrictByIpUITests
Test admin interfaces. Assumes that local testing environment has IP address of 127.0.0.1.

Code

public function testLoginByIpSettingsSubmit() {
  $form = array();
  $form['restrict_by_ip_error_page'] = $this
    ->randomName(5);
  $form['restrict_by_ip_login_range'] = '127.0.0.1/32';
  $this
    ->drupalPost('admin/config/people/restrict_by_ip/login', $form, t('Save configuration'));
  $this
    ->assertText('The configuration options have been saved.');
  $this
    ->assertFieldByName('restrict_by_ip_error_page', $form['restrict_by_ip_error_page']);
  $this
    ->assertFieldByName('restrict_by_ip_login_range', $form['restrict_by_ip_login_range']);
}