|
@@ 931-940 (lines=10) @@
|
| 928 |
|
$this->testAction('/entries/solve/1'); |
| 929 |
|
} |
| 930 |
|
|
| 931 |
|
public function testSolveSaveError() { |
| 932 |
|
$Entries = $this->generate('Entries', ['models' => ['Entry' => ['toggleSolve']]]); |
| 933 |
|
$this->_loginUser(3); |
| 934 |
|
$Entries->Entry->expects($this->once()) |
| 935 |
|
->method('toggleSolve') |
| 936 |
|
->with('1') |
| 937 |
|
->will($this->returnValue(false)); |
| 938 |
|
$this->setExpectedException('BadRequestException'); |
| 939 |
|
$this->testAction('/entries/solve/1'); |
| 940 |
|
} |
| 941 |
|
|
| 942 |
|
public function testSeo() { |
| 943 |
|
$config = Configure::read('App'); |
|
@@ 962-971 (lines=10) @@
|
| 959 |
|
$this->assertTextContains($expected, $result); |
| 960 |
|
} |
| 961 |
|
|
| 962 |
|
public function testSolve() { |
| 963 |
|
$Entries = $this->generate('Entries', ['models' => ['Entry' => ['toggleSolve']]]); |
| 964 |
|
$this->_loginUser(3); |
| 965 |
|
$Entries->Entry->expects($this->once()) |
| 966 |
|
->method('toggleSolve') |
| 967 |
|
->with('1') |
| 968 |
|
->will($this->returnValue(true)); |
| 969 |
|
$result = $this->testAction('/entries/solve/1'); |
| 970 |
|
$this->assertTextEquals($result, ''); |
| 971 |
|
} |
| 972 |
|
|
| 973 |
|
//----------------------------------------------- |
| 974 |
|
|