Skip to content

Commit 75034d4

Browse files
committed
Merge pull request #274 from seuros/master
Fix Award Api !483
2 parents 60f895f + 7d4ed05 commit 75034d4

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ DEPENDENCIES
856856
redis-rails (~> 3.2)
857857
rest-client
858858
rocket_tag
859-
rspec-rails (~> 3.1)
859+
rspec-rails
860860
rubocop
861861
ruby-progressbar
862862
sanitize

config/routes.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
# api GET /api(.:format) pages#show {:page=>:api}
7777
# achievements GET /achievements(.:format) pages#show {:page=>:achievements}
7878
# GET /pages/:page(.:format) pages#show
79-
# award_badge GET /award(.:format) achievements#award
79+
# award_badge POST /award(.:format) achievements#award
8080
# authenticate GET|POST /auth/:provider/callback(.:format) sessions#create
8181
# authentication_failure GET /auth/failure(.:format) sessions#failure
8282
# settings GET /settings(.:format) users#edit
@@ -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)