dotmailer 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +162 -11
- data/TODO.md +6 -0
- data/dotmailer.gemspec +4 -3
- data/lib/dot_mailer.rb +11 -0
- data/lib/dot_mailer/account.rb +66 -0
- data/lib/dot_mailer/client.rb +108 -0
- data/lib/dot_mailer/contact.rb +179 -0
- data/lib/dot_mailer/contact_import.rb +94 -0
- data/lib/{dotmailer → dot_mailer}/data_field.rb +24 -1
- data/lib/dot_mailer/exceptions.rb +16 -0
- data/lib/dot_mailer/opt_in_type.rb +16 -0
- data/lib/dot_mailer/suppression.rb +29 -0
- data/lib/dot_mailer/version.rb +3 -0
- data/lib/dotmailer.rb +1 -3
- data/spec/dot_mailer/account_spec.rb +113 -0
- data/spec/dot_mailer/client_spec.rb +160 -0
- data/spec/dot_mailer/contact_import_spec.rb +173 -0
- data/spec/dot_mailer/contact_spec.rb +303 -0
- data/spec/dot_mailer/data_field_spec.rb +109 -0
- data/spec/dot_mailer/opt_in_type_spec.rb +21 -0
- data/spec/dot_mailer/suppression_spec.rb +67 -0
- data/spec/spec_helper.rb +5 -1
- data/spec/support/assignable_attributes_helper.rb +20 -0
- metadata +37 -8
- data/lib/dotmailer/client.rb +0 -78
- data/lib/dotmailer/exceptions.rb +0 -4
- data/lib/dotmailer/version.rb +0 -3
- data/spec/dotmailer/client_spec.rb +0 -159
- data/spec/dotmailer/data_field_spec.rb +0 -32
@@ -1,32 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Dotmailer::DataField do
|
4
|
-
let(:name) { 'FIRSTNAME' }
|
5
|
-
let(:type) { 'String' }
|
6
|
-
let(:visibility) { 'Public' }
|
7
|
-
let(:default) { 'John' }
|
8
|
-
|
9
|
-
let(:attributes) do
|
10
|
-
{
|
11
|
-
'name' => name,
|
12
|
-
'type' => type,
|
13
|
-
'visibility' => visibility,
|
14
|
-
'defaultValue' => default
|
15
|
-
}
|
16
|
-
end
|
17
|
-
|
18
|
-
subject { Dotmailer::DataField.new(attributes) }
|
19
|
-
|
20
|
-
its(:name) { should == name }
|
21
|
-
its(:type) { should == type }
|
22
|
-
its(:visibility) { should == visibility }
|
23
|
-
its(:default) { should == default }
|
24
|
-
|
25
|
-
its(:to_s) { should == 'Dotmailer::DataField name: "FIRSTNAME", type: "String", visibility: "Public", default: "John"' }
|
26
|
-
|
27
|
-
its(:to_json) { should == attributes.to_json }
|
28
|
-
|
29
|
-
describe '#==' do
|
30
|
-
specify { subject.should == Dotmailer::DataField.new(attributes) }
|
31
|
-
end
|
32
|
-
end
|