require 'spec_helper'

module Spree
  describe "Countries", :type => :feature do
    stub_authorization!

    it "deletes a state", js: true do
      visit spree.admin_countries_path
      click_link "New Country"

      fill_in "Name", with: "Brazil"
      fill_in "Iso Name", with: "BRL"
      click_button "Create"

      accept_alert do
        click_icon :trash
      end
      wait_for_ajax

      expect { Country.find(country.id) }.to raise_error
    end
  end
end

require 'spec_helper'

module Spree
  describe "Countries", type: :feature do
    stub_authorization!

    it "deletes a country", js: true do
      visit spree.admin_countries_path
      click_link "New Country"

      fill_in "Name", with: "Brazil"
      fill_in "Iso Name", with: "BRL"
      click_button "Create"

      accept_alert do
        click_icon :trash
      end

      expect(page).to have_content 'Country "Brazil" has been successfully removed!'
    end
  end
end

Fix bad admin country spec.
Fix bad admin country spec.

Wasn't actually testing anything before.
