public function it_should_delete_news(HttpClient $client) { $client->delete('News/Delete', ['feedId' => $this->getPrimaryKeyValue()])->shouldBeCalled()->willReturn(Helper::noContentResponse()); $this->exists()->shouldBe(true); $this->delete(); $this->exists()->shouldBe(false); }
public function it_should_set_out_of_order_to_true(HttpClient $client) { $client->post("Host/SetOrderState", ['hostId' => $this->getPrimaryKeyValue(), 'inOrder' => "false"])->shouldBeCalled()->willReturn(Helper::noContentResponse()); $this->IsOutOfOrder = true; $this->save(); $this->IsOutOfOrder->shouldBe(true); }
public function it_should_set_user_group(HttpClient $client) { $newUserGroup = $this->getAttribute('GroupId')->getWrappedObject() + 1; $client->post('Users/SetUserGroup', ['userId' => $this->getPrimaryKeyValue(), 'newUserGroup' => $newUserGroup])->shouldBeCalled()->willReturn(Helper::noContentResponse()); $this->setUserGroup($newUserGroup); $this->GroupId->shouldBe($newUserGroup); }
public function it_should_restart_service(HttpClient $client) { $client->get('Service/Restart')->shouldBeCalled()->willReturn(Helper::noContentResponse()); $this->restart(); }