fix the build.

This commit is contained in:
danielgrippi 2011-07-04 16:53:43 -07:00
parent 00448f615e
commit 9debec4410
3 changed files with 4 additions and 18 deletions

View file

@ -1,9 +1,4 @@
class TokensController < ApplicationController
def create
current_user.reset_authentication_token!
current_user.authentication_token
redirect_to token_path, :notice => "Authentication token reset."
end
def show
end
end

View file

@ -69,7 +69,7 @@ Diaspora::Application.routes.draw do
#Temporary token_authenticable route
resource :token, :only => [:show, :create]
resource :token, :only => :show
get 'login' => redirect('/users/sign_in')

View file

@ -1,18 +1,9 @@
describe TokensController do
describe '#create' do
it 'generates a new token for the current user' do
sign_in bob
lambda {
get :create
}.should change{ bob.reload.authentication_token }
end
end
describe '#edit' do
it 'displays a token' do
describe '#show' do
it 'succeeds' do
sign_in eve
get :create
get :show
response.body.should include(eve.reload.authentication_token)
response.should be_success
end
end
end