blob: aabab4b722cc2292f2941c73e19f2d1f8b739ab0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe Api::ProductsController, type: :controller do
it { should route(:post, '/api/products').to(action: :create) }
it do
should route(:put, '/api/products/0439733420a4c5a3e8239bb1').to(action: :update, id: '0439733420a4c5a3e8239bb1')
end
it { should route(:get, '/api/products').to(action: :index) }
it do
should route(:get, '/api/products/0439733420a4c5a3e8239bb1').to(action: :show, id: '0439733420a4c5a3e8239bb1')
end
it do
should route(:delete, '/api/products/0439733420a4c5a3e8239bb1').to(action: :destroy, id: '0439733420a4c5a3e8239bb1')
end
end
|