mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
25 lines
599 B
Ruby
25 lines
599 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'spec_helper'
|
|
|
|
module Spree
|
|
module Admin
|
|
RSpec.describe CountriesController do
|
|
include AuthenticationHelper
|
|
|
|
describe "#update" do
|
|
before { controller_login_as_admin }
|
|
|
|
it "updates the name of an existing country" do
|
|
country = create(:country)
|
|
spree_put :update, id: country.id,
|
|
country: { name: "Kyrgyzstan" }
|
|
|
|
expect(response).to redirect_to spree.admin_countries_url
|
|
expect(country.reload.name).to eq "Kyrgyzstan"
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|