Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
dwilkie committed Oct 20, 2023
1 parent 2cf5649 commit 483c454
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions components/app/config/initializers/aws_stubs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ def to_h
stub_responses: {
describe_voices: {
voices: [
{ gender: "Female", id: "Lotte", language_code: "nl-NL" },
{ gender: "Female", id: "Joanna", language_code: "en-US" }
{ gender: "Female", id: "Joanna", language_code: "en-US", supported_engines: ["standard"] },
{ gender: "Female", id: "Lotte", language_code: "nl-NL", supported_engines: ["neural"] },
{ gender: "Female", id: "Vitoria", language_code: "pt-BR", supported_engines: %w[neural standard] }
]
}
}
Expand Down
6 changes: 3 additions & 3 deletions components/app/spec/call_controllers/say_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@
stub_twiml_request(controller, response: <<~TWIML)
<?xml version="1.0" encoding="UTF-8" ?>
<Response>
<Say voice="Polly.Lotte">Hello World</Say>
<Say voice="Polly.Lotte-Neural">Hello World</Say>
</Response>
TWIML

controller.run

expect(controller).to have_received(:say) do |ssml|
expect(fetch_ssml_attribute(ssml, :name)).to eq("Polly.Lotte")
expect(fetch_ssml_attribute(ssml, :name)).to eq("Polly.Lotte-Neural")
expect(fetch_ssml_attribute(ssml, :lang)).to eq("nl-NL")
end
end
Expand Down Expand Up @@ -163,7 +163,7 @@
controller.run

expect(controller).to have_received(:say) do |ssml|
expect(fetch_ssml_attribute(ssml, :name)).to eq("Polly.Lotte")
expect(fetch_ssml_attribute(ssml, :name)).to eq("Polly.Lotte-Neural")
expect(fetch_ssml_attribute(ssml, :lang)).to eq("nl-NL")
end
end
Expand Down

0 comments on commit 483c454

Please sign in to comment.