From ca17058750c93671bb6fa88c484f330eb0aef8a9 Mon Sep 17 00:00:00 2001 From: zhuhao Date: Sat, 24 Jan 2015 10:35:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A2=84=E6=9E=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spec/models/user_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index b15602f9a..6b8c962bd 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -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