添加预构件
This commit is contained in:
parent
167abcd6b4
commit
ca17058750
|
@ -12,6 +12,11 @@ describe User do
|
|||
it { should respond_to(:login) }
|
||||
it { should respond_to(:mail) }
|
||||
|
||||
#此处采用与构建的方式生成数据
|
||||
# it"is invalid without login" do
|
||||
# user=FactoryGirl.build(:user,login: nil)
|
||||
# expect(user).to_not be_valid
|
||||
# end
|
||||
#用户名唯一性的测试
|
||||
describe "when login is already taken" do
|
||||
before do
|
||||
|
|
Loading…
Reference in New Issue