Sha256: 861776de3de875fd1ff417d95a99a561bcddb445dd57655c81f480d7f58fac51
Contents?: true
Size: 1 KB
Versions: 16
Compression:
Stored size: 1 KB
Contents
# frozen_string_literal: true require "spec_helper" describe "Sessions", type: :feature do let!(:admin) do create(:admin, email: "admin@example.org", password: "123456", password_confirmation: "123456") end before(:each) do visit decidim_system.root_path end context "when using a correct username and password" do it "lets you into the system panel" do within ".new_admin" do fill_in :admin_email, with: "admin@example.org" fill_in :admin_password, with: "123456" find("*[type=submit]").click end expect(page).to have_content("Dashboard") end end context "when using an incorrect username and password" do it "doesn't let you in the admin panel" do within ".new_admin" do fill_in :admin_email, with: "admin@example.org" fill_in :admin_password, with: "forged_password" find("*[type=submit]").click end expect(page).not_to have_content("Dashboard") end end end
Version data entries
16 entries across 16 versions & 1 rubygems