Skip to content

Fix Award Api !483 #274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 30, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ DEPENDENCIES
redis-rails (~> 3.2)
rest-client
rocket_tag
rspec-rails (~> 3.1)
rspec-rails
rubocop
ruby-progressbar
sanitize
Expand Down
4 changes: 2 additions & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
# api GET /api(.:format) pages#show {:page=>:api}
# achievements GET /achievements(.:format) pages#show {:page=>:achievements}
# GET /pages/:page(.:format) pages#show
# award_badge GET /award(.:format) achievements#award
# award_badge POST /award(.:format) achievements#award
# authenticate GET|POST /auth/:provider/callback(.:format) sessions#create
# authentication_failure GET /auth/failure(.:format) sessions#failure
# settings GET /settings(.:format) users#edit
Expand Down Expand Up @@ -356,7 +356,7 @@
get 'achievements' => 'pages#show', :page => :achievements, as: :achievements if Rails.env.development?
get '/pages/:page' => 'pages#show'

get 'award' => 'achievements#award', as: :award_badge
post 'award' => 'achievements#award', as: :award_badge

match '/auth/:provider/callback' => 'sessions#create', as: :authenticate, via: [:get, :post]
get '/auth/failure' => 'sessions#failure', as: :authentication_failure
Expand Down
9 changes: 9 additions & 0 deletions spec/routing/achievements_routing_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
RSpec.describe AchievementsController, type: :routing do
describe 'routing' do

it 'routes to #new' do
expect(post('/award')).to route_to(controller: 'achievements', action: 'award')
end

end
end