public
Description: An open barter system written with ruby on rails. This was written to help local communities to function while jobs are being lost all around them.
Homepage: http://barter.theurbanrebellion.com
Clone URL: git://github.com/m3talsmith/barter.git
barter / trunk / spec / models / user_spec.rb
100644 26 lines (21 sloc) 0.55 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require File.dirname(__FILE__) + '/../spec_helper'
 
describe User do
  before(:each) do
    @user = User.new
  end
  
  it "should be invalid without a login" do
    @user.password = "1234"
    @user.should_not be_valid
    @user.login = "barter4u"
    @user.should be_valid
  end
  
  # it "should be invalid without a unique login" do
  # @user.should_not be_valid
  # end
  
  it "should be invalid without a password" do
    @user.login = "barter4u"
    @user.should_not be_valid
    @user.password = "1234"
    @user.should be_valid
  end
end