Add missing specs on admin

This commit is contained in:
taitus
2017-09-11 19:29:29 +02:00
committed by Senén Rodero Rodríguez
parent c9963b1c4f
commit 7b54451491

View File

@@ -39,7 +39,7 @@ feature 'Admin settings' do
expect(page).not_to have_content "Map configuration"
end
scenario "Should be able when map feature deactivated" do
scenario "Should be able when map feature activated" do
Setting['feature.map'] = true
admin = create(:administrator).user
login_as(admin)
@@ -61,6 +61,26 @@ feature 'Admin settings' do
expect(page).to have_content "Map configuration updated succesfully"
end
scenario "Should update marker", :js do
Setting['feature.map'] = true
admin = create(:administrator).user
login_as(admin)
visit admin_settings_path
expect(find("#latitude", visible: false).value).to eq "51.48"
expect(find("#longitude", visible: false).value).to eq "0.0"
find("#admin-map").click
within "#map-form" do
click_on "Update"
end
expect(find("#latitude", visible: false).value).not_to eq "51.48"
expect(page).to have_content "Map configuration updated succesfully"
end
end
end
end