diff --git a/spec/integration/tmpfollow_spec.rb b/spec/integration/tmpfollow_spec.rb
index 11fc231..fd89b67 100644
--- a/spec/integration/tmpfollow_spec.rb
+++ b/spec/integration/tmpfollow_spec.rb
@@ -27,6 +27,12 @@
it 'shows the current username' do
page.should have_content '@nedstark'
end
+
+ it 'allows signing out' do
+ click_link 'sign out'
+ page.should have_content 'Signed out successfully.'
+ page.should have_content 'Authenticate with Twitter'
+ end
end
context 'with invalid credentials' do
diff --git a/tmpfollow.rb b/tmpfollow.rb
index 29b323b..2254f03 100644
--- a/tmpfollow.rb
+++ b/tmpfollow.rb
@@ -108,11 +108,11 @@ def authenticated?
redirect to '/'
end
- get '/clear' do
+ get '/signout' do
session[:oauth_token] = nil
session[:oauth_token_secret] = nil
- flash[:alert] = 'Tokens cleared.'
+ flash[:alert] = 'Signed out successfully.'
redirect to '/'
end
diff --git a/views/layout.haml b/views/layout.haml
index 027fd0a..b576201 100644
--- a/views/layout.haml
+++ b/views/layout.haml
@@ -12,7 +12,7 @@
= yield
- if authenticated?
- %p.account Authenticated as @#{session[:username]} (#{"log out"}).
+ %p.account Authenticated as @#{session[:username]} (#{"sign out"}).
%footer
Made by Odin Dutton