spec/enceladus/enceladus_spec.rb in enceladus-0.0.7 vs spec/enceladus/enceladus_spec.rb in enceladus-0.0.8
- old
+ new
@@ -24,10 +24,15 @@
it "should set Enceladus::Configuration::Api#include_adult as false" do
subject
expect(Enceladus::Configuration::Api.instance.include_adult).to eq(false)
end
+ it "should set Enceladus::Configuration::Api#language as English" do
+ subject
+ expect(Enceladus::Configuration::Api.instance.language).to eq("en")
+ end
+
describe "include_image_language" do
context "when include_image_language is provided" do
subject { Enceladus.connect(api_key, { include_image_language: include_image_language } ) }
let(:include_image_language) { "pt-BR" }
@@ -38,15 +43,27 @@
end
end
describe "include_adult" do
context "when include_adult is provided" do
- subject { Enceladus.connect(api_key, { include_adult: true }) }
+ subject { Enceladus.connect(api_key, { include_adult: include_adult }) }
let(:include_adult) { true }
it "should set Enceladus::Configuration::Api#include_adult properly" do
subject
expect(Enceladus::Configuration::Api.instance.include_adult).to eq(include_adult)
+ end
+ end
+ end
+
+ describe "language" do
+ context "when language is provided" do
+ subject { Enceladus.connect(api_key, { language: language }) }
+ let(:language) { "en" }
+
+ it "should set Enceladus::Configuration::Api#language properly" do
+ subject
+ expect(Enceladus::Configuration::Api.instance.language).to eq(language)
end
end
end
end
end
\ No newline at end of file