File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5050 end
5151 end
5252
53- context "editing an existing property" do
54- let! ( :property ) { create ( :property , name : "Color" , presentation : "Cool Color" ) }
55-
56- it "updates the property" do
57- visit "/admin/properties"
58- click_on "Color"
59-
60- fill_in "Name" , with : "Size"
61- fill_in "Presentation" , with : "Cool Size"
62- click_on "Update Property"
63-
64- expect ( page ) . to have_content ( "Property was successfully updated." )
65- expect ( page ) . to have_content ( "Size" )
66- expect ( page ) . to have_content ( "Cool Size" )
67- expect ( Spree ::Property . count ) . to eq ( 1 )
68- end
69-
70- it "shows validation errors" do
71- visit "/admin/properties"
72- click_on "Color"
73-
74- fill_in "Name" , with : ""
75- click_on "Update Property"
76-
77- expect ( page ) . to have_content ( "can't be blank" )
78- expect ( Spree ::Property . count ) . to eq ( 1 )
79- end
80- end
81-
8253 context "editing an existing property" do
8354 let! ( :property ) { create ( :property , name : "Color" , presentation : "Cool Color" ) }
8455
You can’t perform that action at this time.
0 commit comments