Code Monkey home page Code Monkey logo

laravel-realworld's Introduction

GitHub Stats Top Languages

laravel-realworld's People

Contributors

choco14t avatar

Watchers

 avatar  avatar

laravel-realworld's Issues

Fix HTTP tests

Run test in local succeed.
But in Scrutinizer fail.

There were 3 failures:

1) Tests\Feature\GetArticleTest::testFilterByTag
Expected status code 200 but received 500.
Failed asserting that false is true.

/home/scrutinizer/build/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestResponse.php:185
/home/scrutinizer/build/tests/Feature/GetArticleTest.php:23

2) Tests\Feature\GetArticleTest::testFilterByAuthor
Expected status code 200 but received 500.
Failed asserting that false is true.

/home/scrutinizer/build/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestResponse.php:185
/home/scrutinizer/build/tests/Feature/GetArticleTest.php:34

3) Tests\Feature\GetArticleTest::testFilterByFavorited
Expected status code 200 but received 500.
Failed asserting that false is true.

/home/scrutinizer/build/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestResponse.php:185
/home/scrutinizer/build/tests/Feature/GetArticleTest.php:45

FAILURES!
Tests: 5, Assertions: 5, Failures: 3.

Fix incorrect responses

Now, /api/articles return incorrect response.

expected:

{
  "articles":[{
    "slug": "how-to-train-your-dragon",
    "title": "How to train your dragon",
    "description": "Ever wonder how?",
    "body": "It takes a Jacobian",
    "tagList": ["dragons", "training"],
    "createdAt": "2016-02-18T03:22:56.637Z",
    "updatedAt": "2016-02-18T03:48:35.824Z",
    "favorited": false,
    "favoritesCount": 0,
    "author": {
      "username": "jake",
      "bio": "I work at statefarm",
      "image": "https://i.stack.imgur.com/xHWG8.jpg",
      "following": false
    }
  }],
  "articlesCount": 1
}

actual:

{
  "articles": [
    {
      "article": {
        "slug": "accusamus-eaque-nostrum-quasi-quibusdam-facere-sed-odit",
        "title": "Accusamus eaque nostrum quasi quibusdam facere sed odit.",
        "description": "Sint nobis ut repellat similique nihil tempore vero deleniti tempora omnis omnis officiis.",
        "body": "Iusto velit qui nulla fuga ut veniam. Fugit dolores voluptas voluptatibus. Aut quia ea officiis expedita. Harum et amet voluptatem quia earum sunt temporibus.",
        "tagList": [],
        "createdAt": "2020-03-12T10:18:57+00:00",
        "updatedAt": "2020-03-12T10:18:57+00:00",
        "favorited": false,
        "favoritesCount": 0,
        "author": {
          "username": "reynolds.rozella",
          "bio": "Nulla modi eius praesentium accusamus. Consequatur porro repudiandae ad esse. Consectetur modi eos totam officiis voluptatem quasi dolores. Animi culpa et quia sit eaque.",
          "image": "https://lorempixel.com/120/120/?78485",
          "following": false
        }
      }
    }
  ],
  "articlesCount": 1
}

Fix users response

Now, POST /api/users, POST /api/users/login return incorrect response.

expected:

{
  "user": {
    "email": "",
    "token": "",
    "username": "",
    "bio": "",
    "image": null
  }
}

actual:

{
  "user": {
    "email": "",
    "password": "",
    "token": ""
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.