<commit_before><commit_msg>Adds a integration test confirming that Capybara,Rails and Devise don't work well with each other.<commit_after>ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../../config/environment", __FILE__)
require 'rspec/rails'
require 'capybara/rspec'
require 'capybara-webkit'
require 'capybara/email/rspec'
require 'headless'

describe 'capybara and devise are broken', type: :request do
  it 'action_mailer default url should change when visiting a page' do  
    initialValue = FactlinkUI::Application.config.action_mailer.default_url_options[:host]

		visit "/"

  	initialValue.should_not equal FactlinkUI::Application.config.action_mailer.default_url_options[:host]
  end
  
  it 'action_mailer default url should change when clicking a link' do  
    initialValue = FactlinkUI::Application.config.action_mailer.default_url_options[:host]
		visit "/"
		FactlinkUI::Application.config.action_mailer.default_url_options[:host] = initialValue

		click_link "Can't access?"

  	initialValue.should_not equal FactlinkUI::Application.config.action_mailer.default_url_options[:host]
  end

  it 'action_mailer default url should change when clicking a button' do
  	initialValue = FactlinkUI::Application.config.action_mailer.default_url_options[:host]
		visit "/"
		FactlinkUI::Application.config.action_mailer.default_url_options[:host] = initialValue

		click_button "Sign in"

  	initialValue.should_not equal FactlinkUI::Application.config.action_mailer.default_url_options[:host]
  end

end
{'fraction_non_alphanumeric': 0.09645669291338582, 'fraction_numerical': 0.0, 'mean_word_length': 5.900452488687783, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6739742', 'n_tokens_mistral': 485, 'n_tokens_neox': 457, 'n_words': 103}