You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Create a new `MerchantProposal#to_osm` method to match model keys to OSM ones.
- Use JSON instead of YAML to render data as OSM keys uses ":" and YAML keys
were confused.
- Add a new description section that renders formatted content (eg: \n) and
allows easy copy/paste.
- Refactor the way proposer email is sent to the mailer to separate it from
merchant data.
Copy file name to clipboardExpand all lines: spec/requests/merchant_proposals_spec.rb
+41-9Lines changed: 41 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -34,15 +34,15 @@
34
34
let(:params)do
35
35
{
36
36
merchant_proposal: {
37
-
name: 'Foobar name',
38
-
street: 'Foobar',
39
-
postcode: 'Foobar',
40
-
city: 'Foobar',
37
+
name: 'Bonhomme de Bois',
38
+
street: '1 Toys street',
39
+
postcode: '1234',
40
+
city: 'Toyzz',
41
41
country: 'FR',
42
-
category: 'dentist',
43
-
description: 'Foobar description',
42
+
category: 'toys',
43
+
description: "Best toys.\nSolid.\nKids and olders.",
44
44
coins: %w[bitcoinmonero],
45
-
contact_odysee: 'https://www.odysee.com/JohnDoe'
45
+
contact_odysee: 'https://www.odysee.com/WoodToys'
46
46
}
47
47
}
48
48
end
@@ -51,8 +51,40 @@
51
51
beforedo
52
52
stub_request(:post,/api.github.com/)
53
53
.with(body: {
54
-
title: 'Proposal for a new merchant: `Foobar name`',
55
-
body: "A new proposition for a merchant has been submitted. Please take a look and add it to OpenStreetMap if relevant:\n\n```yaml\n---\nname: Foobar name\ncategory: Dentist\nstreet: Foobar\npostcode: Foobar\ncity: Foobar\ncountry: France\ndescription: Foobar description\ncoins:\n- bitcoin\n- monero\nask_kyc: false\ncontact_odysee: https://www.odysee.com/JohnDoe\ndelivery: false\n\n```\n\n---\n\n*Note: this issue has been automatically opened from bank-exit website using the Github API.*\n",
54
+
title: 'Proposal for a new merchant: `Bonhomme de Bois`',
55
+
body: <<~MARKDOWN,
56
+
A new proposition for a merchant has been submitted. Please take a look and add it to OpenStreetMap if relevant:
57
+
58
+
```json
59
+
{
60
+
"name": "Bonhomme de Bois",
61
+
"category": "Toy",
62
+
"description": "Best toys. Solid. Kids and olders.",
0 commit comments