Skip to content
Snippets Groups Projects
Commit 9c792183 authored by Marcela Ribeiro de Oliveira's avatar Marcela Ribeiro de Oliveira
Browse files

Merge branch 'rspec' of gitlab.c3sl.ufpr.br:portalmec/portalmec into rspec

parents 9543c9d0 e511fd27
No related branches found
No related tags found
No related merge requests found
require 'acceptance_helpers'
resource 'Suggestions' do
before { 12.times { create(:suggestion) } }
let(:suggestions) { Suggestion.all }
get '/v1/suggestions' do
example_request 'Getting all suggestions' do
expect(status).to eq(200)
end
end
get '/v1/suggestions/:id' do
let(:id) { suggestions.first.id }
example_request 'Getting a suggestion' do
do_request
expect(status).to eq(200)
end
end
end
FactoryGirl.define do
factory :suggestion do |f|
f.name { Faker::Lorem.word }
f.link { Faker::Lorem.word }
f.description { Faker::Lorem.sentence }
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment