Sha256: 2155d981525d21f3d5f772fc2917f3fbe67a73dcf31f50174ca6129271bc4032
Contents?: true
Size: 927 Bytes
Versions: 17
Compression:
Stored size: 927 Bytes
Contents
require 'spec_helper' describe AngularSprinkles::FormBinder::CheckBox do let(:method) { ->(name, *opts) {} } let(:args) { [:attribute] } let(:attribute_binding) { double } let(:object) { double(bind: attribute_binding) } let(:params) { { method: method, args: args, object: object } } it 'returns the arguments with the second one augmented' do augmented_args = described_class.new(params).call expect(augmented_args.second["ng-model"]).to eq(attribute_binding) args.push({}) augmented_args = described_class.new(params).call expect(augmented_args.second["ng-model"]).to eq(attribute_binding) args.push(1) augmented_args = described_class.new(params).call expect(augmented_args.second["ng-model"]).to eq(attribute_binding) args.push(1, 0) augmented_args = described_class.new(params).call expect(augmented_args.second["ng-model"]).to eq(attribute_binding) end end
Version data entries
17 entries across 17 versions & 1 rubygems