Skip to content

Commit 904d0bd

Browse files
committed
Fix test cases
1 parent 4dea3ec commit 904d0bd

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/optimizely/event/entity/event_batch.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def build
4848
event_batch.anonymize_ip = @anonymize_ip
4949
event_batch.enrich_decisions = @enrich_decisions
5050
event_batch.visitors = @visitors
51-
event_batch.region = @region
51+
event_batch.region = @region || 'US'
5252
event_batch
5353
end
5454

@@ -65,7 +65,7 @@ def with_revision(revision)
6565
end
6666

6767
def with_region(region)
68-
@region = region
68+
@region = region || 'US'
6969
end
7070

7171
def with_client_name(client_name)

spec/event/event_entities_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
revision: '42',
7070
client_name: Optimizely::CLIENT_ENGINE,
7171
enrich_decisions: true,
72-
client_version: Optimizely::VERSION
72+
client_version: Optimizely::VERSION,
73+
region: 'US'
7374
}
7475

7576
@expected_conversion_payload = {
@@ -103,7 +104,8 @@
103104
revision: '42',
104105
client_name: Optimizely::CLIENT_ENGINE,
105106
enrich_decisions: true,
106-
client_version: Optimizely::VERSION
107+
client_version: Optimizely::VERSION,
108+
region: 'US'
107109
}
108110
end
109111

0 commit comments

Comments
 (0)