mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-08 07:03:23 -06:00
Make tests compatible with laravel 5.4
This commit is contained in:
parent
018af62826
commit
79f94771c3
@ -95,7 +95,7 @@ class ImportControllerTest extends TestCase
|
||||
$this->be($this->user());
|
||||
$response = $this->post(route('import.process-configuration', ['p-configure']), $data);
|
||||
$response->assertStatus(302);
|
||||
$this->assertRedirectedToRoute('import.settings', ['p-configure']);
|
||||
$response->assertRedirect(route('import.settings', ['p-configure']));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -110,7 +110,7 @@ class ImportControllerTest extends TestCase
|
||||
$this->be($this->user());
|
||||
$response = $this->post(route('import.post-settings', ['p-settings']), $data);
|
||||
$response->assertStatus(302);
|
||||
$this->assertRedirectedToRoute('import.settings', ['p-settings']);
|
||||
$response->assertRedirect(route('import.settings', ['p-settings']));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -124,7 +124,7 @@ class ImportControllerTest extends TestCase
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('import.settings', ['settings']));
|
||||
$response->assertStatus(302);
|
||||
$this->assertRedirectedToRoute('import.complete', ['settings']);
|
||||
$response->assertRedirect(route('import.complete', ['settings']));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -11,6 +11,7 @@ declare(strict_types = 1);
|
||||
|
||||
namespace Tests\Feature\Controllers;
|
||||
|
||||
use FireflyIII\Models\PiggyBank;
|
||||
use Tests\TestCase;
|
||||
|
||||
class PiggyBankControllerTest extends TestCase
|
||||
@ -72,7 +73,7 @@ class PiggyBankControllerTest extends TestCase
|
||||
$response = $this->post(route('piggy-banks.destroy', [2]));
|
||||
$response->assertStatus(302);
|
||||
$response->assertSessionHas('success');
|
||||
$this->assertRedirectedToRoute('index');
|
||||
$response->assertRedirect(route('index'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -116,7 +117,7 @@ class PiggyBankControllerTest extends TestCase
|
||||
$this->be($this->user());
|
||||
$response = $this->post(route('piggy-banks.add', [1]), $data);
|
||||
$response->assertStatus(302);
|
||||
$this->assertRedirectedToRoute('piggy-banks.index');
|
||||
$response->assertRedirect(route('piggy-banks.index'));
|
||||
$response->assertSessionHas('success');
|
||||
}
|
||||
|
||||
@ -137,7 +138,7 @@ class PiggyBankControllerTest extends TestCase
|
||||
$this->be($this->user());
|
||||
$response = $this->post(route('piggy-banks.add', [$piggy->id]), $data);
|
||||
$response->assertStatus(302);
|
||||
$this->assertRedirectedToRoute('piggy-banks.index');
|
||||
$response->assertRedirect(route('piggy-banks.index'));
|
||||
$response->assertSessionHas('success');
|
||||
}
|
||||
|
||||
@ -150,7 +151,7 @@ class PiggyBankControllerTest extends TestCase
|
||||
$this->be($this->user());
|
||||
$response = $this->post(route('piggy-banks.remove', [1]), $data);
|
||||
$response->assertStatus(302);
|
||||
$this->assertRedirectedToRoute('piggy-banks.index');
|
||||
$response->assertRedirect(route('piggy-banks.index'));
|
||||
$response->assertSessionHas('success');
|
||||
}
|
||||
|
||||
@ -203,7 +204,7 @@ class PiggyBankControllerTest extends TestCase
|
||||
$response = $this->post(route('piggy-banks.store'), $data);
|
||||
$response->assertStatus(302);
|
||||
$response->assertSessionHas('success');
|
||||
$this->assertRedirectedToRoute('index');
|
||||
$response->assertRedirect(route('index'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -223,7 +224,7 @@ class PiggyBankControllerTest extends TestCase
|
||||
$response = $this->post(route('piggy-banks.update', [3]), $data);
|
||||
$response->assertStatus(302);
|
||||
$response->assertSessionHas('success');
|
||||
$this->assertRedirectedToRoute('index');
|
||||
$response->assertRedirect(route('index'));
|
||||
}
|
||||
|
||||
|
||||
|
@ -37,7 +37,7 @@ class PreferencesControllerTest extends TestCase
|
||||
$response->assertStatus(302);
|
||||
$response->assertSessionHas('success');
|
||||
$response->assertSessionHas('info');
|
||||
$this->assertRedirectedToRoute('preferences.index');
|
||||
$response->assertRedirect(route('preferences.index'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -72,7 +72,7 @@ class PreferencesControllerTest extends TestCase
|
||||
$response = $this->post(route('preferences.update'), $data);
|
||||
$response->assertStatus(302);
|
||||
$response->assertSessionHas('success');
|
||||
$this->assertRedirectedToRoute('preferences.index');
|
||||
$response->assertRedirect(route('preferences.index'));
|
||||
}
|
||||
|
||||
}
|
@ -81,7 +81,7 @@ class ProfileControllerTest extends TestCase
|
||||
$this->be($this->user());
|
||||
$response = $this->post(route('profile.delete-account.post'), $data);
|
||||
$response->assertStatus(302);
|
||||
$this->assertRedirectedToRoute('index');
|
||||
$response->assertRedirect(route('index'));
|
||||
}
|
||||
|
||||
}
|
@ -51,7 +51,7 @@ class RuleControllerTest extends TestCase
|
||||
$response = $this->post(route('rules.destroy', [1]));
|
||||
$response->assertStatus(302);
|
||||
$response->assertSessionHas('success');
|
||||
$this->assertRedirectedToRoute('index');
|
||||
$response->assertRedirect(route('index'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -62,7 +62,7 @@ class RuleControllerTest extends TestCase
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('rules.down', [1]));
|
||||
$response->assertStatus(302);
|
||||
$this->assertRedirectedToRoute('rules.index');
|
||||
$response->assertRedirect(route('rules.index'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -176,7 +176,7 @@ class RuleControllerTest extends TestCase
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('rules.up', [1]));
|
||||
$response->assertStatus(302);
|
||||
$this->assertRedirectedToRoute('rules.index');
|
||||
$response->assertRedirect(route('rules.index'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -51,7 +51,7 @@ class RuleGroupControllerTest extends TestCase
|
||||
$response = $this->post(route('rule-groups.destroy', [1]));
|
||||
$response->assertStatus(302);
|
||||
$response->assertSessionHas('success');
|
||||
$this->assertRedirectedToRoute('index');
|
||||
$response->assertRedirect(route('index'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -62,7 +62,7 @@ class RuleGroupControllerTest extends TestCase
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('rule-groups.down', [1]));
|
||||
$response->assertStatus(302);
|
||||
$this->assertRedirectedToRoute('rules.index');
|
||||
$response->assertRedirect(route('rules.index'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -91,7 +91,7 @@ class RuleGroupControllerTest extends TestCase
|
||||
$response = $this->post(route('rule-groups.execute', [1]), $data);
|
||||
$response->assertStatus(302);
|
||||
$response->assertSessionHas('success');
|
||||
$this->assertRedirectedToRoute('rules.index');
|
||||
$response->assertRedirect(route('rules.index'));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -134,7 +134,7 @@ class RuleGroupControllerTest extends TestCase
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('rule-groups.up', [1]));
|
||||
$response->assertStatus(302);
|
||||
$this->assertRedirectedToRoute('rules.index');
|
||||
$response->assertRedirect(route('rules.index'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user