Skip to content

Instantly share code, notes, and snippets.

@MaryKuz
Created March 28, 2019 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaryKuz/3d6696568b3652c427f898a71e3d3892 to your computer and use it in GitHub Desktop.
Save MaryKuz/3d6696568b3652c427f898a71e3d3892 to your computer and use it in GitHub Desktop.
Tests for routes
require 'rails_helper'
describe Api::ProductsController do
it { should route(:get, '/api/products').to(action: :index) }
it { should route(:get, '/api/products/1').to(action: :show, id: 1) }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment