Skip to content

Commit 1388fd1

Browse files
authored
tests: Various fixes to tests (#1565)
1 parent aef62e3 commit 1388fd1

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

cdn/Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
source "https://rubygems.org"
1616

17+
gem "base64"
18+
1719
group :test do
1820
gem "rspec"
1921
gem "rspec_junit_formatter"

endpoints/getting-started/spec/endpoint_sample_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,6 @@
6767
error = JSON.parse last_response.body
6868

6969
expect(error["error"]).to eq 500
70-
expect(error["message"]).to include "unexpected token"
70+
expect(error["message"]).to include "unexpected"
7171
end
7272
end

functions/test/firebase/firestore_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
end
3434

3535
assert_includes err, "Function triggered by change to: #{source}"
36-
assert_match(/Old value: {"a"=>1}/, err)
37-
assert_match(/New value: {"b"=>2}/, err)
36+
assert_match(/Old value: \{"a"\s?=>\s?1\}/, err)
37+
assert_match(/New value: \{"b"\s?=>\s?2\}/, err)
3838
end
3939
end
4040
end

functions/test/firebase/rtdb_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
assert_includes err, "Function triggered by change to: #{source}"
3535
assert_includes err, "Admin?: false"
36-
assert_includes err, 'Delta: {"foo"=>"bar"}'
36+
assert_match(/Delta: \{"foo"\s?=>\s?"bar"\}/, err)
3737
end
3838
end
3939
end

media_cdn/Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
source "https://rubygems.org"
1616

17+
gem "base64"
1718
gem "ed25519"
1819

1920
group :test do

0 commit comments

Comments
 (0)