Coder Social home page Coder Social logo

Comments (4)

rodolfobandeira avatar rodolfobandeira commented on July 23, 2024

@janwerkhoven Did you notice that authorize_api_requests.rb is named using plural instead of singular? Try renaming to authorize_api_request.rb

from simple_command.

janwerkhoven avatar janwerkhoven commented on July 23, 2024

Apologies, that's a typo. I've verified and the file name is app/commands/authorize_api_request.rb as described in this tutorial: https://www.pluralsight.com/guides/ruby-ruby-on-rails/token-based-authentication-with-ruby-on-rails-5-api

It works beautifully when curling to localhost:3000, but breaks in tests... Any suggestions?

from simple_command.

rodolfobandeira avatar rodolfobandeira commented on July 23, 2024

@janwerkhoven From what I can see in these two examples you showed, looks like you added an additional folder called admin/ and some controllers inside it. Keep in mind that this will could change the namespace behavior for these classes.

Double check if your failing test is on the same path. ex: test/controllers/admin/your_test_file

A full stacktrace or at least the code line its calling that command reference would help to solve this issue.
cheers

from simple_command.

kennyadsl avatar kennyadsl commented on July 23, 2024

Closing since too much time passed (sorry), feel free to reopen if this is still a thing.

from simple_command.

Related Issues (15)

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.