be($this->user());
$this->call('get', route('transactions.mass.delete', [561, 562]));
$this->assertResponseStatus(200);
$this->see('Delete a number of transactions');
// has bread crumb
$this->see('
');
}
/**
* @covers \FireflyIII\Http\Controllers\Transaction\MassController::destroy
*/
public function testDestroy()
{
$this->session(['transactions.mass-delete.url' => 'http://localhost']);
$data = [
'confirm_mass_delete' => [56, 37],
];
$this->be($this->user());
$this->call('post', route('transactions.mass.destroy'), $data);
$this->assertSessionHas('success');
$this->assertResponseStatus(302);
// visit them should give 404.
$this->call('get', route('transactions.show', [56]));
$this->assertResponseStatus(404);
}
/**
* @covers \FireflyIII\Http\Controllers\Transaction\MassController::edit
*/
public function testEdit()
{
$this->be($this->user());
$this->call('get', route('transactions.mass.delete', [132, 113]));
$this->assertResponseStatus(200);
$this->see('Edit a number of transactions');
// has bread crumb
$this->see('');
}
/**
* @covers \FireflyIII\Http\Controllers\Transaction\MassController::update
*/
public function testUpdate()
{
$this->session(['transactions.mass-edit.url' => 'http://localhost']);
$data = [
'journals' => [132],
'description' => [132 => 'Updated salary thing'],
'amount' => [132 => 1600],
'amount_currency_id_amount_132' => 1,
'date' => [132 => '2014-07-24'],
'source_account_name' => [132 => 'Job'],
'destination_account_id' => [132 => 1],
'category' => [132 => 'Salary'],
];
$this->be($this->user());
$this->call('post', route('transactions.mass.update', [132]), $data);
$this->assertSessionHas('success');
$this->assertResponseStatus(302);
// visit them should show updated content
$this->call('get', route('transactions.show', [132]));
$this->assertResponseStatus(200);
$this->see('Updated salary thing');
}
}