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