Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
rdok committed Mar 18, 2016
2 parents 6fca47b + 501cadb commit 0428bea
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion resources/views/ahk/my/_partials/left_sidebar.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<!--Left Sidebar-->
@if($user->avatar)
<img class="img-responsive profile-img margin-bottom-20"
src="{!! route('files.render', ['path' => $user->avatar->path]) !!}" alt="">
src="{!! route('files.render', ['path' => $user->avatar->path ]) !!}" alt="">
@endif

<ul class="list-group sidebar-nav-v1 margin-bottom-40" id="sidebar-nav-1">
<li class="list-group-item {!$utilities->activate(['my.profile']) !!}">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/cms/companies/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<td><img src="{{ $company->logo }}" height="30" alt="Company Logo"/></td>
<td>{{ $company->name_of_contact_partner }}</td>
</tr>

@endforeach

</table>
</div><!-- /.box-body -->
<div class="box-footer clearfix">
Expand Down
10 changes: 8 additions & 2 deletions tests/functional/ahk/companyRepresentative/CompaniesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

use App\Ahk\Company;
use App\Ahk\Country;
use App\Ahk\File;
use App\Ahk\Industry;
use App\Ahk\Repositories\User\DbUserRepository;
use App\Ahk\Storage\FilesStorage;
Expand All @@ -27,7 +26,14 @@ class CompaniesTest extends TestCase
public function it_reads_owned_companies_index()
{
$dbUserRepository = new DbUserRepository();
$companyRepresentativeUser = factory(User::class)->create();
$companyRepresentativeUser = factory(User::class)->create(['avatar_id' => null]);
$dbUserRepository->assignCompanyRepresentativeRole($companyRepresentativeUser);

// Access when on company on data set.
$this->actingAs($companyRepresentativeUser)
->visit(route('my.companies.index')); // check exception due to missing avatar

$companyRepresentativeUser = factory(User::class)->create([]);
$dbUserRepository->assignCompanyRepresentativeRole($companyRepresentativeUser);
$companies = factory(Company::class, 2)->create(['user_id' => $companyRepresentativeUser->id]);
$companyValidator = factory(Company::class)->create();
Expand Down

0 comments on commit 0428bea

Please sign in to comment.