Sha256: 6e4ae52ba7af1ccc074e8df220ce9508f9f09083ca12264cd8b31ed992b3f99e

Contents?: true

Size: 614 Bytes

Versions: 5

Compression:

Stored size: 614 Bytes

Contents

require 'spec_helper'

describe Group::ValidateAll do 

  it "Validating multiple UseCase:Validators at the same time without one interrupting the other" do

    post = RubyPost.new
    context = Group::ValidateAll.perform(post: post)
    context.success?.should == false
    post.errors.added?(:title, :blank).should == true
    post.errors.added?(:body, :blank).should == true
    post.errors.size.should == 2

    post2 = RubyPost.new(title: 'title', body: 'body')
    context = Group::ValidateAll.perform(post: post2)
    context.success?.should == true
    post2.errors.empty?.should == true
    
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
usecasing_validations-0.7.0 spec/usecasing/validate_group_validator_spec.rb
usecasing_validations-0.6.0 spec/usecasing/validate_group_validator_spec.rb
usecasing_validations-0.5.5 spec/usecasing/validate_group_validator_spec.rb
usecasing_validations-0.5.4 spec/usecasing/validate_group_validator_spec.rb
usecasing_validations-0.5.3 spec/usecasing/validate_group_validator_spec.rb