From 610c8f301f69f5af23e8b53615b20cf2d5f3d1c1 Mon Sep 17 00:00:00 2001 From: Greg Answer Date: Thu, 22 Apr 2021 09:16:49 -0400 Subject: [PATCH] Add test for when member exists --- spec/requests/members_spec.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spec/requests/members_spec.rb b/spec/requests/members_spec.rb index 4537e966..b08a0bd5 100644 --- a/spec/requests/members_spec.rb +++ b/spec/requests/members_spec.rb @@ -49,14 +49,14 @@ end describe 'viewing a member' do - # context 'when member exists' do - # subject { post '/members', headers: headers } - # - # it 'returns the correct status code' do - # subject - # expect(response).to have_http_status(:success) - # end - # end + context 'when member exists' do + subject { get "/members/#{Member.first.id}", headers: headers } + + it 'returns the correct status code' do + subject + expect(response).to have_http_status(:success) + end + end context 'when member not fond' do subject { get '/members/0', headers: headers }