spec/features/dashboard/subscription_spec.rb in storytime-2.0.0 vs spec/features/dashboard/subscription_spec.rb in storytime-2.1.0

- old
+ new

@@ -1,8 +1,8 @@ require 'spec_helper' -describe "In the dashboard, Subscriptions" do +describe "In the dashboard, Subscriptions", type: :feature do before do login_admin end it "lists subscriptions", js: true do @@ -25,11 +25,11 @@ click_link "new-subscription-link" # wait_for_ajax fill_in "subscription_email", with: "some_random_email@example.com" click_button "Save" - + within "#storytime-modal" do expect(page).to have_content "some_random_email@example.com" end end @@ -40,21 +40,21 @@ expect(subscription.subscribed?).to eq(true) visit storytime.dashboard_path click_link "utility-menu-toggle" click_link "subscriptions-link" - + within "#storytime-modal" do click_link "edit-subscription-#{subscription.id}" end within "#storytime-modal" do fill_in "subscription_email", with: "johndoe@example.com" uncheck "subscription_subscribed" click_button "Save" end - within "#storytime-modal" do + within "#storytime-modal" do expect(page).to have_content "johndoe@example.com" end end -end \ No newline at end of file +end