spec/unit/tables/formotion_screen_spec.rb in ProMotion-1.1.1 vs spec/unit/tables/formotion_screen_spec.rb in ProMotion-1.1.2
- old
+ new
@@ -17,6 +17,21 @@
@screen.form.submit
@screen.submitted_form.should.not.be.nil
@screen.submitted_form.render.should.be.kind_of(Hash)
end
-end
+ describe "After update_table_data" do
+ before do
+ @screen.test_update_table_data
+ end
+
+ it "should update the table data" do
+ @screen.table_data[:sections][0][:title].should == "Updated Data"
+ end
+
+ it "should fire the on_submit method when form is submitted" do
+ @screen.form.submit
+ @screen.submitted_form.should.not.be.nil
+ @screen.submitted_form.render.should.be.kind_of(Hash)
+ end
+ end
+end
\ No newline at end of file