Based on cane gem, removed tab indents and trailing blanks
This commit is contained in:
@@ -6,7 +6,7 @@ class DashboardController < ApplicationController
|
|||||||
|
|
||||||
# See if the user has a font preference
|
# See if the user has a font preference
|
||||||
if params[:font]
|
if params[:font]
|
||||||
cookies[:font] = params[:font]
|
cookies[:font] = params[:font]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -10,16 +10,15 @@ describe User do
|
|||||||
DatabaseCleaner.strategy = :truncation
|
DatabaseCleaner.strategy = :truncation
|
||||||
end
|
end
|
||||||
|
|
||||||
it "can be instantiated" do
|
it "can be instantiated" do
|
||||||
Benefits.new.should be_an_instance_of(Benefits)
|
Benefits.new.should be_an_instance_of(Benefits)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "name can be updated" do
|
||||||
it "name can be updated" do
|
new_name = "Bobby"
|
||||||
new_name = "Bobby"
|
user = User.all.first
|
||||||
user = User.all.first
|
user.first_name = new_name
|
||||||
user.first_name = new_name
|
user.save!
|
||||||
user.save!
|
User.all.first.first_name.should == new_name
|
||||||
User.all.first.first_name.should == new_name
|
end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
+20
-20
@@ -10,28 +10,28 @@ describe User do
|
|||||||
DatabaseCleaner.strategy = :truncation
|
DatabaseCleaner.strategy = :truncation
|
||||||
end
|
end
|
||||||
|
|
||||||
it "can be instantiated" do
|
it "can be instantiated" do
|
||||||
User.new.should be_an_instance_of(User)
|
User.new.should be_an_instance_of(User)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should require a email" do
|
it "should require a email" do
|
||||||
User.new(:email => "").should_not be_valid
|
User.new(:email => "").should_not be_valid
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should require valid email" do
|
it "should require valid email" do
|
||||||
User.new(:email => "@gmail.com").should_not be_valid
|
User.new(:email => "@gmail.com").should_not be_valid
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should require unique email" do
|
it "should require unique email" do
|
||||||
user = User.all.first
|
user = User.all.first
|
||||||
User.new(:email => user.email).should_not be_valid
|
User.new(:email => user.email).should_not be_valid
|
||||||
end
|
end
|
||||||
|
|
||||||
it "name can be updated" do
|
it "name can be updated" do
|
||||||
new_name = "Bobby"
|
new_name = "Bobby"
|
||||||
user = User.all.first
|
user = User.all.first
|
||||||
user.first_name = new_name
|
user.first_name = new_name
|
||||||
user.save!
|
user.save!
|
||||||
User.all.first.first_name.should == new_name
|
User.all.first.first_name.should == new_name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user