test/configuration_test.rb in wisepdf-1.3.0 vs test/configuration_test.rb in wisepdf-1.3.1

- old
+ new

@@ -49,6 +49,27 @@ assert_equal 8, Wisepdf::Configuration.options[:footer][:font_size] assert_equal 8, Wisepdf::Configuration.options[:footer][:spacing] assert_equal 15, Wisepdf::Configuration.options[:margin][:bottom] end end + + context "Asset pipeline configuration" do + setup do + Wisepdf::Configuration.reset! + end + + should "use the asset pipeline if assets.enabled is nil" do + ::Rails.configuration.assets.enabled = nil + assert(Wisepdf::Configuration.use_asset_pipeline?) + end + + should "use the asset pipeline if assets.enabled is true" do + ::Rails.configuration.assets.enabled = true + assert(Wisepdf::Configuration.use_asset_pipeline?) + end + + should "not use the asset pipeline if assets.enabled is false" do + ::Rails.configuration.assets.enabled = false + assert(!Wisepdf::Configuration.use_asset_pipeline?) + end + end end