Skip to content
Snippets Groups Projects
Commit 59dd17a6 authored by Frank Febbraro's avatar Frank Febbraro
Browse files

Fixed user unit test

parent 1a60aa12
No related branches found
No related tags found
No related merge requests found
...@@ -73,17 +73,16 @@ class FeedsCSVtoUsersTest extends FeedsWebTestCase { ...@@ -73,17 +73,16 @@ class FeedsCSVtoUsersTest extends FeedsWebTestCase {
$this->importFile('user_import', $this->absolutePath() . '/tests/feeds/users.csv'); $this->importFile('user_import', $this->absolutePath() . '/tests/feeds/users.csv');
// Assert result. // Assert result.
$this->assertText('Created 4 users'); $this->assertText('Created 3 users');
// 1 user has an invalid email address, all users should be assigned // 1 user has an invalid email address, all users should be assigned
// the manager role. // the manager role.
$this->assertText('Failed importing 1 user'); $this->assertText('Failed importing 2 user');
$this->drupalGet('admin/people'); $this->drupalGet('admin/people');
$this->assertText('Morticia'); $this->assertText('Morticia');
$this->assertText('Fester'); $this->assertText('Fester');
$this->assertText('Gomez'); $this->assertText('Gomez');
$this->assertText('Pugsley');
$count = db_query("SELECT count(*) FROM {users_roles} WHERE rid = :rid", array(':rid' => $manager_rid))->fetchField(); $count = db_query("SELECT count(*) FROM {users_roles} WHERE rid = :rid", array(':rid' => $manager_rid))->fetchField();
$this->assertEqual($count, 4, t('All imported users were assigned the manager role.')); $this->assertEqual($count, 3, t('All imported users were assigned the manager role.'));
$count = db_query("SELECT count(*) FROM {users_roles} WHERE rid = :rid", array(':rid' => $admin_rid))->fetchField(); $count = db_query("SELECT count(*) FROM {users_roles} WHERE rid = :rid", array(':rid' => $admin_rid))->fetchField();
$this->assertEqual($count, 0, t('No imported user was assigned the administrator role.')); $this->assertEqual($count, 0, t('No imported user was assigned the administrator role.'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment