Skip to content

Commit

Permalink
Use patch instead of put in events_request_spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
brentgreeff committed Jan 22, 2018
1 parent 023a3b9 commit df38a1b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/requests/events_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def params
end

context 'that exists' do
before { put "/events/#{event.to_param}", params: {event: params} }
before { patch "/events/#{event.to_param}", params: {event: params} }

it 'returns 204' do
expect( response ).to have_http_status(204)
Expand All @@ -145,7 +145,7 @@ def params
end

context 'that does not exist' do
before { put "/events/0", params: params }
before { patch "/events/0", params: params }

it 'returns 404' do
expect(response).to have_http_status(404)
Expand All @@ -159,7 +159,7 @@ def params
end

context 'thats invalid' do
before { put "/events/#{event.to_param}", params: {event: invalid} }
before { patch "/events/#{event.to_param}", params: {event: invalid} }

def invalid
attributes_for(:event).merge(
Expand All @@ -179,7 +179,7 @@ def invalid
end

context 'with a new group name' do
before { put "/events/#{event.to_param}", params: {event: g_name} }
before { patch "/events/#{event.to_param}", params: {event: g_name} }

def g_name
attributes_for(:event).merge(
Expand Down

0 comments on commit df38a1b

Please sign in to comment.