spec/api/user/create_user_spec.rb in rhoconnect-3.2.0.beta1 vs spec/api/user/create_user_spec.rb in rhoconnect-3.2.0.beta2

- old
+ new

@@ -10,7 +10,17 @@ User.load(params[:attributes][:login]).login.should == params[:attributes][:login] User.authenticate(params[:attributes][:login], params[:attributes][:password]).login.should == params[:attributes][:login] @a.users.members.sort.should == [@u.login, params[:attributes][:login]] end - end + end + + it_should_behave_like "ApiHelper" do + it "should not create user with empty login" do + params = {:api_token => @api_token, + :attributes => {:login => '', :password => ''}} + post "/api/user/create_user", params + last_response.should_not be_ok + User.is_exist?('').should == false + end + end end \ No newline at end of file