mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Transpec feature specs brought from spre_backend
This commit is contained in:
@@ -12,9 +12,9 @@ describe "General Settings" do
|
||||
|
||||
context "visiting general settings (admin)" do
|
||||
it "should have the right content" do
|
||||
page.should have_content("General Settings")
|
||||
find("#site_name").value.should == "Spree Demo Site"
|
||||
find("#site_url").value.should == "demo.spreecommerce.com"
|
||||
expect(page).to have_content("General Settings")
|
||||
expect(find("#site_name").value).to eq("Spree Demo Site")
|
||||
expect(find("#site_url").value).to eq("demo.spreecommerce.com")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -25,13 +25,13 @@ describe "General Settings" do
|
||||
|
||||
assert_successful_update_message(:general_settings)
|
||||
|
||||
find("#site_name").value.should == "Spree Demo Site99"
|
||||
expect(find("#site_name").value).to eq("Spree Demo Site99")
|
||||
end
|
||||
|
||||
def assert_successful_update_message(resource)
|
||||
flash = Spree.t(:successfully_updated, resource: Spree.t(resource))
|
||||
within("[class='flash success']") do
|
||||
page.should have_content(flash)
|
||||
expect(page).to have_content(flash)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -17,9 +17,9 @@ describe "image settings" do
|
||||
fill_in "Attachments Path", :with => "spec/dummy/tmp/bfaoro"
|
||||
click_button "Update"
|
||||
|
||||
Spree::Config[:attachment_url].should == "foobar"
|
||||
Spree::Config[:attachment_default_url].should == "barfoo"
|
||||
Spree::Config[:attachment_path].should == "spec/dummy/tmp/bfaoro"
|
||||
expect(Spree::Config[:attachment_url]).to eq("foobar")
|
||||
expect(Spree::Config[:attachment_default_url]).to eq("barfoo")
|
||||
expect(Spree::Config[:attachment_path]).to eq("spec/dummy/tmp/bfaoro")
|
||||
end
|
||||
|
||||
# Regression test for #3069
|
||||
|
||||
@@ -17,16 +17,16 @@ describe "Mail Methods" do
|
||||
it "should be able to edit mail method settings" do
|
||||
fill_in "mail_bcc", :with => "spree@example.com99"
|
||||
click_button "Update"
|
||||
page.should have_content("successfully updated!")
|
||||
expect(page).to have_content("successfully updated!")
|
||||
end
|
||||
|
||||
# Regression test for #2094
|
||||
it "does not clear password if not provided" do
|
||||
Spree::Config[:smtp_password] = "haxme"
|
||||
click_button "Update"
|
||||
page.should have_content("successfully updated!")
|
||||
expect(page).to have_content("successfully updated!")
|
||||
|
||||
Spree::Config[:smtp_password].should_not be_blank
|
||||
expect(Spree::Config[:smtp_password]).not_to be_blank
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user