Skip to content

Commit ec4b2f3

Browse files
committed
Fix Api
1 parent 03c3b79 commit ec4b2f3

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

config/routes.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@
356356
get 'achievements' => 'pages#show', :page => :achievements, as: :achievements if Rails.env.development?
357357
get '/pages/:page' => 'pages#show'
358358

359-
get 'award' => 'achievements#award', as: :award_badge
359+
post 'award' => 'achievements#award', as: :award_badge
360360

361361
match '/auth/:provider/callback' => 'sessions#create', as: :authenticate, via: [:get, :post]
362362
get '/auth/failure' => 'sessions#failure', as: :authentication_failure
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
RSpec.describe AchievementsController, type: :routing do
2+
describe 'routing' do
3+
4+
it 'routes to #new' do
5+
expect(post('/award')).to route_to(controller: 'achievements', action: 'award')
6+
end
7+
8+
end
9+
end

0 commit comments

Comments
 (0)