mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-23 12:27:05 +00:00
New tests.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<form style="display: inline;" action="{{route('piggybanks.add',$piggybank->id)}}" method="POST">
|
<form style="display: inline;" id="add" action="{{route('piggybanks.add',$piggybank->id)}}" method="POST">
|
||||||
{{Form::token()}}
|
{{Form::token()}}
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
@extends('layouts.default')
|
@extends('layouts.default')
|
||||||
@section('content')
|
@section('content')
|
||||||
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName()) }}
|
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName()) }}
|
||||||
{{Form::open(['class' => 'form-horizontal','url' => route('piggybanks.store')])}}
|
{{Form::open(['class' => 'form-horizontal','id' => 'store','url' => route('piggybanks.store')])}}
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-6 col-md-12 col-sm-6">
|
<div class="col-lg-6 col-md-12 col-sm-6">
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
@extends('layouts.default')
|
@extends('layouts.default')
|
||||||
@section('content')
|
@section('content')
|
||||||
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $piggybank) }}
|
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $piggybank) }}
|
||||||
{{Form::open(['class' => 'form-horizontal','url' => route('piggybanks.destroy',$piggybank->id)])}}
|
{{Form::open(['class' => 'form-horizontal','id' => 'destroy','url' => route('piggybanks.destroy',$piggybank->id)])}}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-6 col-md-12 col-sm-12">
|
<div class="col-lg-6 col-md-12 col-sm-12">
|
||||||
<div class="panel panel-red">
|
<div class="panel panel-red">
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
@extends('layouts.default')
|
@extends('layouts.default')
|
||||||
@section('content')
|
@section('content')
|
||||||
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $piggybank) }}
|
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $piggybank) }}
|
||||||
{{Form::model($piggybank, ['class' => 'form-horizontal','url' => route('piggybanks.update',$piggybank->id)])}}
|
{{Form::model($piggybank, ['class' => 'form-horizontal','id' => 'update','url' => route('piggybanks.update',$piggybank->id)])}}
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-6 col-md-12 col-sm-6">
|
<div class="col-lg-6 col-md-12 col-sm-6">
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<form style="display: inline;" action="{{route('piggybanks.remove',$piggybank->id)}}" method="POST">
|
<form style="display: inline;" id="remove" action="{{route('piggybanks.remove',$piggybank->id)}}" method="POST">
|
||||||
{{Form::token()}}
|
{{Form::token()}}
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@@ -28,6 +28,24 @@ if (!function_exists('mf')) {
|
|||||||
return '€ ' . $string;
|
return '€ ' . $string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!function_exists('boolstr')) {
|
||||||
|
/**
|
||||||
|
* @param $boolean
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
function boolstr($boolean)
|
||||||
|
{
|
||||||
|
if (is_bool($boolean) && $boolean === true) {
|
||||||
|
return 'BOOLEAN TRUE';
|
||||||
|
}
|
||||||
|
if (is_bool($boolean) && $boolean === false) {
|
||||||
|
return 'BOOLEAN FALSE';
|
||||||
|
}
|
||||||
|
|
||||||
|
return 'NO BOOLEAN: ' . $boolean;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$app = new Illuminate\Foundation\Application;
|
$app = new Illuminate\Foundation\Application;
|
||||||
|
@@ -58,6 +58,8 @@ class PiggyBankControllerCest
|
|||||||
$I->wantTo('destroy a piggy bank');
|
$I->wantTo('destroy a piggy bank');
|
||||||
$I->amOnPage('/piggybanks/delete/1');
|
$I->amOnPage('/piggybanks/delete/1');
|
||||||
$I->see('Delete "New camera"');
|
$I->see('Delete "New camera"');
|
||||||
|
$I->submitForm('#destroy', []);
|
||||||
|
$I->see('Piggy bank "New camera" deleted.');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -70,6 +72,16 @@ class PiggyBankControllerCest
|
|||||||
$I->see('Edit piggy bank "New camera"');
|
$I->see('Edit piggy bank "New camera"');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param FunctionalTester $I
|
||||||
|
*/
|
||||||
|
public function editWithTargetDate(FunctionalTester $I)
|
||||||
|
{
|
||||||
|
$I->wantTo('edit a piggy bank with a target date');
|
||||||
|
$I->amOnPage('/piggybanks/edit/2');
|
||||||
|
$I->see('Edit piggy bank "New clothes"');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param FunctionalTester $I
|
* @param FunctionalTester $I
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user