This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch member_data
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/member_data by this push:
new 4bf47ff Fix failing tests for changed output
4bf47ff is described below
commit 4bf47ff45266bac390b66398e21423b6cc184ebf
Author: Sebb <[email protected]>
AuthorDate: Fri Mar 11 20:34:41 2022 +0000
Fix failing tests for changed output
---
lib/spec/lib/member_spec.rb | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/lib/spec/lib/member_spec.rb b/lib/spec/lib/member_spec.rb
index 743360c..e646b7b 100644
--- a/lib/spec/lib/member_spec.rb
+++ b/lib/spec/lib/member_spec.rb
@@ -46,13 +46,22 @@ describe ASF::Member do
fields = {fullname: 'Full Name', address: "Line 1\nLine2", availid: 'a-b-c',
email: '[email protected]'}
it "make_entry() should raise error" do
expect { ASF::Member.make_entry(fields.reject{|k,v| k == :fullname}) }.to
raise_error(ArgumentError, ':fullname is required')
- expect { ASF::Member.make_entry(fields.reject{|k,v| k == :address}) }.to
raise_error(ArgumentError, ':address is required')
expect { ASF::Member.make_entry(fields.reject{|k,v| k == :availid}) }.to
raise_error(ArgumentError, ':availid is required')
- expect { ASF::Member.make_entry(fields.reject{|k,v| k == :email}) }.to
raise_error(ArgumentError, ':email is required')
end
it "make_entry(fields) should create entry" do
res = ASF::Member.make_entry(fields)
- expect(res).to eq("Full Name\n Line 1\n Line2\n Email:
[email protected]\n Forms on File: ASF Membership Application\n Avail ID:
a-b-c\n")
+ expect(res).to eq(
+ <<~MEMAPP
+ Full Name
+ Line 1
+ Line2
+ <Country>
+ Email: [email protected]
+ Tel: <phone number>
+ Forms on File: ASF Membership Application
+ Avail ID: a-b-c
+ MEMAPP
+ )
end
it "make_entry({country:}}) should create entry with country" do
res = ASF::Member.make_entry(fields.merge({country: 'UN'}))