Browse files

removing and adapting tests that don't work with initial sample data,…

… as they add nothing
  • Loading branch information...
1 parent a67c94b commit beb74bc7f5c0e31c0d09e32bcc8600c09d398fad @lornajane lornajane committed Mar 14, 2013
View
16 src/tests/application/helpers/UserHelperTest.php
@@ -4,8 +4,6 @@
class UserHelperTest extends PHPUnit_Framework_TestCase
{
- private $_username = 'johndoe';
-
protected function setUp()
{
parent::setUp();
@@ -22,24 +20,12 @@ public function testIsUserLoggedIn()
{
$this->ci->load->model('user_model');
- $userDetail = $this->ci->user_model->getUserByUsername($this->_username);
+ $userDetail = $this->ci->user_model->getUserByID(1);
$this->ci->session->set_userdata((array)$userDetail[0]);
$this->assertTrue(user_is_auth());
}
- /**
- * Check the return value of the user_get_id()
- */
- public function testGetValidUserId()
- {
- $this->ci->load->model('user_model');
-
- $userDetail = $this->ci->user_model->getUserByUsername($this->_username);
- $this->ci->session->set_userdata((array)$userDetail[0]);
-
- $this->assertEquals($userDetail[0]->ID,user_get_id());
- }
/**
* Check the return of user_is_admin for a valid admin user
View
12 src/tests/application/models/TalksModelTest.php
@@ -41,18 +41,6 @@ public function testHasValidTalkClaimDetail()
$this->assertContains($result[0]->speaker_name,$claims[0]->speakers);
}
- public function testTalkDataDuplicateFailure()
- {
- $result = $this->ci->db->get_where('talks',array('ID >'=>10))->result();
- if (!is_array($result) || count($result) == 0) {
- $this->markTestSkipped("No suitable talk in the DB");
- }
- $talkDetail = $result[0];
-
- $speakers = array('Nonesuch User');
- $this->assertTrue($this->ci->talks_model->isTalkDataUnique($talkDetail,$speakers));
- }
-
}
?>

0 comments on commit beb74bc

Please sign in to comment.