Sha256: aa038ea431dd66c9823daf9e71ac568edd23c448e7b578aad431098f7ef31e69

Contents?: true

Size: 741 Bytes

Versions: 7

Compression:

Stored size: 741 Bytes

Contents

# frozen_string_literal: true

require "rails_helper"

RSpec.feature "Auth registration", type: :feature do
  describe "when registration is disabled" do
    it "returns a 404" do
      visit archangel.new_user_registration_path

      expect(page.status_code).to eq 404
    end
  end

  describe "when registration is enabled" do
    it "has additional form fields" do
      allow(Archangel.config).to receive(:allow_registration) { true }

      visit archangel.new_user_registration_path

      expect(page).to have_text "Name"
      expect(page).to have_text "Username"

      expect(page).to have_selector("input[type=text][id='user_name']")
      expect(page).to have_selector("input[type=text][id='user_username']")
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
archangel-0.0.8 spec/features/auth/registration_spec.rb
archangel-0.0.7 spec/features/auth/registration_spec.rb
archangel-0.0.6 spec/features/auth/registration_spec.rb
archangel-0.0.5 spec/features/auth/registration_spec.rb
archangel-0.0.4 spec/features/auth/registration_spec.rb
archangel-0.0.3 spec/features/auth/registration_spec.rb
archangel-0.0.2 spec/features/auth/registration_spec.rb