Skip to content

Commit

Permalink
rewrite test and make federation show without cfg and tag files
Browse files Browse the repository at this point in the history
  • Loading branch information
temaotl committed May 24, 2024
1 parent f4331c7 commit 5224feb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 46 deletions.
27 changes: 0 additions & 27 deletions resources/views/federations/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,33 +68,6 @@
@section('admin_section')




<x-element.body-section>
<x-slot name="dt">
{{ __('federations.tagfile') }}
</x-slot>

<x-slot name="dd">
<code class="text-sm text-pink-500">
{{ $federation->tagfile }}
</code>
</x-slot>
</x-element.body-section>

<x-element.body-section>
<x-slot name="dt">
{{ __('federations.cfgfile') }}
</x-slot>

<x-slot name="dd">
<code class="text-sm text-pink-500">
{{ $federation->cfgfile }}
</code>
</x-slot>
</x-element.body-section>


<x-element.body-section>
<x-slot name="dt">
{{ __('common.add_sp_idp') }}
Expand Down
23 changes: 4 additions & 19 deletions tests/Feature/Http/Controllers/FederationControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,8 @@ public function a_user_can_add_a_new_federation()
$federation = Federation::first();
$this->assertEquals($federationName, $federation->name);
$this->assertEquals($federationDescription, $federation->description);
$this->assertEquals($federationTagfile, $federation->tagfile);
$this->assertEquals($federationCfgfile, $federation->cfgfile);
$this->assertEquals($federationXmlid, $federation->xml_id);
$this->assertEquals($federationXmlname, $federation->xml_name);
$this->assertEquals($federationFilters, $federation->filters);
$this->assertEquals(0, $federation->approved);
$this->assertEquals(0, $federation->active);
$this->assertNull($federation->deleted_at);
Expand All @@ -367,8 +364,7 @@ public function a_user_with_operator_permission_can_see_federations_edit_page()
->assertSee($federation->name)
->assertSee($federation->description)
->assertSee($federation->xml_id)
->assertSee($federation->xml_name)
->assertSee($federation->filters);
->assertSee($federation->xml_name);

$this->assertEquals(1, Federation::count());
$this->assertEquals(route('federations.edit', $federation), url()->current());
Expand Down Expand Up @@ -818,10 +814,7 @@ public function an_admin_is_shown_a_federations_details()
->assertSeeText($federation->name)
->assertSeeText($federation->description)
->assertSeeText($federation->xml_id)
->assertSeeText($federation->xml_name)
->assertSeeText($federation->tagfile)
->assertSeeText($federation->cfgfile)
->assertSeeText($federation->filters);
->assertSeeText($federation->xml_name);

$this->assertEquals(1, Federation::count());
$this->assertEquals(route('federations.show', $federation), url()->current());
Expand Down Expand Up @@ -864,11 +857,8 @@ public function an_admin_can_add_a_new_federation()
$federation = Federation::first();
$this->assertEquals($federationName, $federation->name);
$this->assertEquals($federationDescription, $federation->description);
$this->assertEquals($federationTagfile, $federation->tagfile);
$this->assertEquals($federationCfgfile, $federation->cfgfile);
$this->assertEquals($federationXmlid, $federation->xml_id);
$this->assertEquals($federationXmlname, $federation->xml_name);
$this->assertEquals($federationFilters, $federation->filters);
$this->assertEquals(0, $federation->approved);
$this->assertEquals(0, $federation->active);
$this->assertNull($federation->deleted_at);
Expand All @@ -889,8 +879,7 @@ public function an_admin_can_see_federations_edit_page()
->assertSee($federation->name)
->assertSee($federation->description)
->assertSee($federation->xml_id)
->assertSee($federation->xml_name)
->assertSee($federation->filters);
->assertSee($federation->xml_name);

$this->assertEquals(1, Federation::count());
$this->assertEquals(route('federations.edit', $federation), url()->current());
Expand Down Expand Up @@ -945,7 +934,6 @@ public function an_admin_can_edit_an_existing_federation()
$this->assertEquals($federationDescription, $federation->description);
$this->assertEquals($federationXmlId, $federation->xml_id);
$this->assertEquals($federationXmlName, $federation->xml_name);
$this->assertEquals($federationFilters, $federation->filters);
$this->assertEquals(1, Federation::count());
$this->assertEquals(route('federations.show', $federation), url()->current());
}
Expand Down Expand Up @@ -1244,10 +1232,7 @@ public function not_even_an_admin_can_run_update_function_without_definig_action
->assertSeeText($federation->name)
->assertSeeText($federation->description)
->assertSeeText($federation->xml_id)
->assertSeeText($federation->xml_name)
->assertSeeText($federation->tagfile)
->assertSeeText($federation->cfgfile)
->assertSeeText($federation->filters);
->assertSeeText($federation->xml_name);

$this->assertEquals(route('federations.show', $federation), url()->current());
}
Expand Down

0 comments on commit 5224feb

Please sign in to comment.