test/javascript_helper_spec.rb in stripe-rails-1.1.1 vs test/javascript_helper_spec.rb in stripe-rails-1.1.2
- old
+ new
@@ -30,6 +30,22 @@
view.stripe_javascript_tag(:v3).wont_include 'https://js.stripe.com/v1/stripe-debug.js'
end
end
end
end
+
+ describe "render :partial => 'stripe/js'" do
+ subject { view.render :partial => 'stripe/js' }
+
+ it 'should render correctly' do
+ subject.must_include 'https://js.stripe.com/v3/'
+ end
+ end
+
+ describe "render :partial => 'stripe/js', local: {stripe_js_version: 'v2'}" do
+ subject { view.render :partial => 'stripe/js', locals: {stripe_js_version: 'v2'} }
+
+ it 'should render correctly' do
+ subject.must_include 'https://js.stripe.com/v2/'
+ end
+ end
end