Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

removing and adapting tests that don't work with initial sample data #713

Merged
merged 1 commit into from

2 participants

@lornajane
Owner

We've got tests that fail with the default system data, this attempts to adapt or update the ones causing an issue on my system.

@dstockto dstockto was assigned
@dstockto dstockto merged commit beb74bc into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 14, 2013
  1. @lornajane
This page is out of date. Refresh to see the latest.
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));
- }
-
}
?>
Something went wrong with that request. Please try again.