Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fokosun committed Sep 19, 2023
1 parent 4f66c10 commit b639084
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 95 deletions.
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd

RUN mkdir -p /var/www
WORKDIR /var/www
COPY ./ /var/www/
# Set working directory
WORKDIR /var/www

# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
Expand All @@ -37,9 +38,6 @@ RUN useradd -G www-data,root -u 1000 -d /home/dev dev
RUN mkdir -p /home/dev/.composer && \
chown -R dev:dev /home/dev

# Set working directory
WORKDIR /var/www

USER $user

RUN echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/php.ini
Expand Down
58 changes: 0 additions & 58 deletions Vagrantfile

This file was deleted.

2 changes: 1 addition & 1 deletion app/Services/UserService.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __construct()
*/
public function index()
{
return User::with('cookbooks', 'recipes', 'contact')->get();
return User::paginate(15);
}

/**
Expand Down
48 changes: 30 additions & 18 deletions tests/Feature/UserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,24 +230,36 @@ public function it_can_retrieve_all_users()
->assertStatus(200)
->assertJsonStructure([
'data' => [
[
'name',
'cookbooks',
'recipes',
'contact',
'contributions',
'email',
'following',
'followers',
'created_at',
'updated_at',
'name_slug',
'pronouns',
'avatar',
'expertise_level',
'about',
'can_take_orders',
'email_verified'
'current_page',
'first_page_url',
'from',
'last_page',
'last_page_url',
'links',
'next_page_url',
'path',
'per_page',
'prev_page_url',
'to',
'total',
'data' => [
[
'name',
'contact_detail',
'contributions',
'email',
'following',
'followers',
'created_at',
'updated_at',
'name_slug',
'pronouns',
'avatar',
'expertise_level',
'about',
'can_take_orders',
'email_verified'
]
]
]
]);
Expand Down

0 comments on commit b639084

Please sign in to comment.