Personal email and password
diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb
index 397a56e..d38ea27 100644
--- a/app/views/layouts/base.html.erb
+++ b/app/views/layouts/base.html.erb
@@ -25,6 +25,8 @@
<%= display_meta_tags site: AppSettings.application_name %>
+
+
diff --git a/config/settings/development.yml.sample b/config/settings/development.yml.sample
index a2646d9..f02828e 100644
--- a/config/settings/development.yml.sample
+++ b/config/settings/development.yml.sample
@@ -9,6 +9,8 @@ slack_team_name: ''
slack_team_id: ''
buffer_access_token: ''
+recaptcha_client_key: ''
+
mailgun_api_key: ''
mailchimp_api_key: ''
mail_host: ''
diff --git a/config/settings/production.yml.sample b/config/settings/production.yml.sample
index a2646d9..f02828e 100644
--- a/config/settings/production.yml.sample
+++ b/config/settings/production.yml.sample
@@ -9,6 +9,8 @@ slack_team_name: ''
slack_team_id: ''
buffer_access_token: ''
+recaptcha_client_key: ''
+
mailgun_api_key: ''
mailchimp_api_key: ''
mail_host: ''
diff --git a/config/settings/test.yml.sample b/config/settings/test.yml.sample
index bff7aec..ad86509 100644
--- a/config/settings/test.yml.sample
+++ b/config/settings/test.yml.sample
@@ -10,6 +10,8 @@ slack_team_name: 'mena developers'
slack_team_id: ''
buffer_access_token: ''
+recaptcha_client_key: ''
+
mailgun_api_key: ''
mailchimp_api_key: ''
mail_host: 'smtp.sparkpostmail.com'
diff --git a/spec/requests/registrations_spec.rb b/spec/requests/registrations_spec.rb
new file mode 100644
index 0000000..c4a8868
--- /dev/null
+++ b/spec/requests/registrations_spec.rb
@@ -0,0 +1,66 @@
+require 'rails_helper'
+
+RSpec.describe "Registrations", type: :request do
+ include Devise::Test::IntegrationHelpers
+
+ let(:existing_user) { create(:user, password: 'password') }
+
+ describe "GET /users/sign_up" do
+ before do
+ visit new_user_registration_path
+
+ expect(page).to have_content('Register with your personal email')
+ expect(page).to have_content('Email')
+ expect(page).to have_content('Password')
+ expect(page).to have_content('Password confirmation')
+ end
+
+ describe "Successful" do
+ it "should register user successfully after filling the form" do
+ fill_in 'user_email', with: 'email@example.com'
+ fill_in 'user_password', with: 'password'
+ fill_in 'Password confirmation', with: 'password'
+
+ click_on('Join us')
+
+ expect(page).to have_content("We are MENA Devs")
+ end
+ end
+
+ describe "Fails" do
+ it "should fail registration because email already exists" do
+ fill_in 'Email', with: existing_user.email
+ fill_in 'Password', with: 'password'
+ fill_in 'Password confirmation', with: 'password'
+
+ click_on('Join us')
+
+ expect(page).to have_content("1 error prohibited this user from being saved")
+ expect(page).to have_content("Email has already been taken")
+ end
+
+ it "should fail registration because passwords do not match" do
+ fill_in 'Email', with: 'mars@example.com'
+ fill_in 'Password', with: 'password'
+ fill_in 'Password confirmation', with: 'passwordz'
+
+ click_on('Join us')
+
+ expect(page).to have_content("1 error prohibited this user from being saved")
+ expect(page).to have_content("Password confirmation doesn't match Password")
+ end
+
+
+ it "should fail registration because email address is incorrect" do
+ fill_in 'Email', with: 'mars-example.com'
+ fill_in 'Password', with: 'password'
+ fill_in 'Password confirmation', with: 'password'
+
+ click_on('Join us')
+
+ expect(page).to have_content("1 error prohibited this user from being saved")
+ expect(page).to have_content("Email is invalid")
+ end
+ end
+ end
+end
\ No newline at end of file