Permalink
Browse files

removed dead code, added more tests

  • Loading branch information...
1 parent b4f74ac commit 0e3bb4ee2692cefc2df21e186b91682c06b9d262 @ArturG ArturG committed Mar 1, 2014
@@ -1,14 +1,7 @@
class ApplicationController < ActionController::Base
protect_from_forgery
- helper_method :title
- def title t=nil
- @title = t unless t.blank?
- @title
- end
-
rescue_from CanCan::AccessDenied do |exception|
redirect_to login_url, :alert => exception.message
end
-
end
@@ -1,8 +1,4 @@
module ApplicationHelper
- def program_path program
- "/users/#{program.author_username}/programs/#{program.slug}"
- end
-
def markdown(text)
Redcarpet::Markdown.new(Redcarpet::Render::HTML.new(hard_wrap: true), autolink: true).render(text).html_safe
end
@@ -0,0 +1,20 @@
+require 'spec_helper'
+
+describe DeletedUser do
+
+ before do
+ @user = DeletedUser.new
+ end
+
+ it 'has deleted username' do
+ @user.username.should == 'Deleted User'
+ end
+
+ it 'has no email' do
+ @user.email.should == 'none'
+ end
+
+ it 'returns deleted user param' do
+ @user.to_param.should == 'deleted_user'
+ end
+end
@@ -22,6 +22,4 @@
end
end
end
-
-
end

0 comments on commit 0e3bb4e

Please sign in to comment.