source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/helpers/notes_helper_test.rb
Ruby
mit
92
main
784
require 'test_helper' class NotesHelperTest < ActionView::TestCase include ERB::Util describe 'display_note_text_for method' do before do with_versioning(create(:user)) do patient = create :patient @note = patient.notes.create attributes_for(:note) end end it 'should retur...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/helpers/welcome_message_helper_test.rb
Ruby
mit
92
main
363
require 'test_helper' class WelcomeMessageHelperTest < ActionView::TestCase describe 'random welcome message' do it 'should return a string' do assert random_welcome_message.is_a? String end it 'should be sourced entirely of strings' do send(:welcome_messages).each do |msg| assert ms...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/helpers/patients_helper_test.rb
Ruby
mit
92
main
12,275
require 'test_helper' class PatientsHelperTest < ActionView::TestCase describe 'weeks_options' do it 'should pluralize properly' do assert_equal '1 week', weeks_options.second[0] assert_equal '2 weeks', weeks_options.third[0] assert_equal 1, weeks_options.select { |x| /week$/.match x[0] }.count...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/helpers/events_helper_test.rb
Ruby
mit
92
main
1,018
require 'test_helper' class EventsHelperTest< ActionView::TestCase describe 'fontawesome_classes' do it 'should kit properly' do event = create :event, event_type: :pledged, pledge_amount: 100 assert_equal 'far fa-thumbs-up', fontawesome_classes(event) event = create :event, event_type: :left_...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/helpers/change_log_helper_test.rb
Ruby
mit
92
main
603
require 'test_helper' class ChangeLogHelperTest < ActionView::TestCase describe 'safe_join_fields convenience method' do before do with_versioning do patient = create :patient, name: 'Old name' patient.update name: 'New name', city: 'Canada' @changeset = patient.versions.first ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/helpers/clinicfinders_helper_test.rb
Ruby
mit
92
main
1,696
require 'test_helper' require 'ostruct' # Test the field parser class ClinicfindersHelperTest < ActionView::TestCase describe 'parse_clinicfinder_field' do before do @clinic = create :clinic @clinic_struct = OpenStruct.new @clinic.attributes end it 'should parse location specially' do ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/helpers/practical_supports_helper_test.rb
Ruby
mit
92
main
6,445
require 'test_helper' class PracticalSupportsHelperTest < ActionView::TestCase describe 'practical support options' do describe 'with a config' do before { create_practical_support_config } it 'should include the option set' do expected = [ nil, "Metallica Tickets", ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/helpers/external_pledges_helper_test.rb
Ruby
mit
92
main
2,219
require 'test_helper' class ExternalPledgesHelperTest < ActionView::TestCase describe 'options generators' do before do create_external_pledge_source_config @options = external_pledge_source_options end it 'should spit out an array of available other funds' do assert_includes @options,...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/helpers/lines_helper_test.rb
Ruby
mit
92
main
1,135
require 'test_helper' class LinesHelperTest < ActionView::TestCase include ERB::Util describe 'convenience methods' do it 'should return empty if not set' do assert_nil current_line assert_nil current_line_display end it 'should show a link if 2+ lines' do @lines = [ create(...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/helpers/pledges_helper_test.rb
Ruby
mit
92
main
1,151
require 'test_helper' class PledgesHelperTest < ActionView::TestCase describe 'convenience methods' do describe 'submit_pledge_button' do it 'should return a span tag' do assert_match /span/, submit_pledge_button assert_match /Submit pledge/, submit_pledge_button end end end ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/helpers/footer_helper_test.rb
Ruby
mit
92
main
352
require 'test_helper' class FooterHelperTest < ActionView::TestCase before { create_fax_service_config } describe 'fax service' do it 'should return the config' do fax_link_html = fax_service assert_match 'href="https://www.efax.com"', fax_link_html assert_match '>https://www.efax.com</a>', ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/helpers/navbar_helper_test.rb
Ruby
mit
92
main
668
require 'test_helper' class NavbarHelperTest < ActionView::TestCase include ERB::Util describe 'cm_resources_link' do before do @config = create :config, config_key: 'resources_url', config_value: { options: ['http://www.google.com'] } end it 'should return nil i...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/helpers/tooltips_helper_test.rb
Ruby
mit
92
main
1,638
require 'test_helper' # For testing the tooltips functions class TooltipsHelperTest < ActionView::TestCase describe 'drop-in methods' do describe 'tooltip shell' do it 'should return a span with tooltip text' do content = tooltip_shell 'yolo goat' assert_match /yolo goat/, content.to_s ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/helpers/calls_helper_test.rb
Ruby
mit
92
main
4,008
require 'test_helper' class CallsHelperTest < ActionView::TestCase before do @patient = create :patient create_voicemail_config end describe 'voicemail link with warning' do it 'returns no voicemail notifier text if vm pref is set to no' do @patient.voicemail_preference = 'no' assert_mat...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/helpers/dashboards_helper_test.rb
Ruby
mit
92
main
1,326
require 'test_helper' class DashboardsHelperTest < ActionView::TestCase include ERB::Util before do @date_1 = DateTime.new(2016, 5, 21).in_time_zone @date_2 = DateTime.new(2016, 5, 31).in_time_zone @monday_start = :monday end describe 'date_range method' do it 'should return correct default d...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/helpers/users_helper_test.rb
Ruby
mit
92
main
675
require 'test_helper' class UsersHelperTest < ActionView::TestCase describe 'user role options' do it 'should return a span tag' do assert user_role_options.is_a? Array end end describe 'user_lock_status helper' do before do @user = create :user, name: 'Locke' end it 'should retu...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/helpers/budget_bar_helper_test.rb
Ruby
mit
92
main
2,800
require 'test_helper' class BudgetBarHelperTest < ActionView::TestCase include ERB::Util describe 'progress bar color' do it 'should spit out correct color class based on type' do assert_equal 'bg-warning', progress_bar_color(:pledged) assert_equal 'bg-success', progress_bar_color(:sent) end ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/helpers/tables_helper_test.rb
Ruby
mit
92
main
587
require 'test_helper' class TablesHelperTest < ActionView::TestCase include ERB::Util describe 'autosortable methods' do describe 'th_autosortable' do it 'should choke on a bad datatype' do assert_raises RuntimeError do th_autosortable 'Status', 'date', {} end end ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/initializers/time_with_zone_test.rb
Ruby
mit
92
main
1,488
require 'test_helper' class TimeWithZoneTest < ActiveSupport::TestCase # The system time of the Rails app is set to ET describe "display_date" do it "converts a time_with_zone stored in system time to the configured time zone and displays" do config = Config.create(config_key: :time_zone, config_value: ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/services/uri_service_test.rb
Ruby
mit
92
main
1,145
require 'test_helper' class UriServiceTest < ActiveSupport::TestCase describe 'URI service utility' do it 'instantiates a uri from string' do uri = UriService.new("example.net").uri assert uri.is_a?(URI) end it 'instantiates nil on invalidURIs' do uri = UriService.new(":::::::::::"...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/services/pledge_form_generator_test.rb
Ruby
mit
92
main
2,034
require 'test_helper' class PledgeFormGeneratorTest < ActiveSupport::TestCase before do create :pledge_config, fund: ActsAsTenant.current_tenant # ActsAsTenant.current_tenant.update pledge_generation_config: 'DCAF' @user = create :user, name: 'Da User' clinic = create :clinic, name: 'Da Clinic', city...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/services/clinic_finder/gestation_helper_test.rb
Ruby
mit
92
main
1,628
# require 'test_helper' # require_relative '../lib/clinic_finder/gestation_helper' # class TestGestationHelper < TestClass # def setup # @helper = ClinicFinder::GestationHelper.new(10) # @clinic = { # 'street_address': '2025 Pacific', # 'city': 'Los Angeles', # 'state': 'CA', # 'zip':...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/services/clinic_finder/clinic_finder_test.rb
Ruby
mit
92
main
6,931
require 'test_helper' # Test initialization and top level methods. class ClinicFinderTest < ActiveSupport::TestCase before do # These fixtures are CA in honor of the Abortion Access Hackathon SF team # who originally constructed the clinic finder code, and who are wonderful create :clinic, name: 'PP Oakl...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/mailers/user_mailer_test.rb
Ruby
mit
92
main
351
require 'test_helper' class UserMailerTest < ActionMailer::TestCase test 'should send an email' do @user = create :user mail = UserMailer.password_changed(@user.id) assert_equal 'Your DARIA password has changed', mail.subject assert_equal [@user.email], mail.to assert_equal ['no-reply@dcabortionf...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/mailers/previews/user_mailer_preview.rb
Ruby
mit
92
main
288
# Preview all emails at http://localhost:3000/rails/mailers/user_mailer class UserMailerPreview < ActionMailer::Preview # Preview this email at http://localhost:3000/rails/mailers/user_mailer/password_changed def password_changed UserMailer.password_changed(User.first) end end
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/controllers/practical_supports_controller_test.rb
Ruby
mit
92
main
4,673
require 'test_helper' class PracticalSupportsControllerTest < ActionDispatch::IntegrationTest before do @patient = create :patient @user = create :user sign_in @user end describe 'create' do before do with_versioning(@user) do @support = attributes_for :practical_support po...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/controllers/configs_controller_test.rb
Ruby
mit
92
main
1,479
require 'test_helper' class ConfigsControllerTest < ActionDispatch::IntegrationTest describe 'non-admin redirects' do [:data_volunteer, :cm].each do |role| it "should deny access as a #{role}" do delete destroy_user_session_path user = create :user, role: role config = create :confi...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/controllers/clinics_controller_test.rb
Ruby
mit
92
main
3,073
require 'test_helper' # Tests for the clinics controller class ClinicsControllerTest < ActionDispatch::IntegrationTest before do @user = create :user, role: :admin sign_in @user end describe 'index' do it 'should render if admin' do get clinics_path assert_response :success end ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/controllers/dashboards_controller_test.rb
Ruby
mit
92
main
1,679
require 'test_helper' class DashboardsControllerTest < ActionDispatch::IntegrationTest before do @user = create :user @line = create :line @patient = create :patient, name: 'Susie Everyteen', primary_phone: '123-456-7890', other_phone: '33...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/controllers/lines_controller_test.rb
Ruby
mit
92
main
1,173
require 'test_helper' # Test lines setting behavior class LinesControllerTest < ActionDispatch::IntegrationTest before do @user = create :user @line = create :line sign_in @user end describe 'new' do describe 'instance with multiple lines' do # Stub a second line before { create :lin...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/controllers/notes_controller_test.rb
Ruby
mit
92
main
1,501
require 'test_helper' class NotesControllerTest < ActionDispatch::IntegrationTest before do @user = create :user sign_in @user @patient = create :patient end describe 'create method' do before do with_versioning(@user) do @note = attributes_for :note, full_text: 'This is a note' ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/controllers/auth_factors_controller_test.rb
Ruby
mit
92
main
1,145
require 'test_helper' # Tests for the auth factors controller class AuthFactorsControllerTest < ActionDispatch::IntegrationTest before do @user = create :user, role: :admin sign_in @user end describe 'new' do it 'should render' do get new_auth_factor_path assert_redirected_to build_auth...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/controllers/omniauth_callbacks_controller_test.rb
Ruby
mit
92
main
501
require 'test_helper' require 'omniauth_helper' class OmniauthCallbacksControllerTest < ActionDispatch::IntegrationTest # before do # request.env['devise.mapping'] = Devise.mappings[:user] # request.env['omniauth.auth'] = OmniAuth.config.mock_auth[:google_oauth2] # end # TODO add an everything's okay al...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/controllers/call_lists_controller_test.rb
Ruby
mit
92
main
3,556
require 'test_helper' class CallListsControllerTest < ActionDispatch::IntegrationTest before do @user = create :user, role: 'admin' @user_2 = create :user, role: 'cm', name: 'Billy Everyteen' @line = create :line @patient_1 = create :patient, name: 'Susan Everyteen', line: @line @patient_2 = crea...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/controllers/patients_controller_test.rb
Ruby
mit
92
main
14,945
require 'test_helper' class PatientsControllerTest < ActionDispatch::IntegrationTest before do @user = create :user @admin = create :user, role: :admin @line = create :line @data_volunteer = create :user, role: :data_volunteer sign_in @user choose_line @line @clinic = create :clinic ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/controllers/events_controller_test.rb
Ruby
mit
92
main
348
require 'test_helper' class EventsControllerTest < ActionDispatch::IntegrationTest before do @user = create :user line = create :line sign_in @user choose_line line end describe 'index method' do before do get events_path end it 'should return success' do assert_response...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/controllers/accountants_controller_test.rb
Ruby
mit
92
main
4,851
# require 'test_helper' # class AccountantsControllerTest < ActionDispatch::IntegrationTest # extend MiniTest::OptionalRetry # before do # @patient = create :patient, clinic: @clinic, # appointment_date: 4.days.from_now, # fund_pledge: 50 # end...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/controllers/calls_controller_test.rb
Ruby
mit
92
main
3,207
require 'test_helper' class CallsControllerTest < ActionDispatch::IntegrationTest before do @user = create :user sign_in @user @patient = create :patient end describe 'new method' do it 'should respond successfully' do get new_patient_call_path(@patient), xhr: true assert_response :s...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/controllers/users_controller_test.rb
Ruby
mit
92
main
7,061
require 'test_helper' class UsersControllerTest < ActionDispatch::IntegrationTest extend Minitest::OptionalRetry before do @user = create :user, role: 'admin' @user_2 = create :user, role: 'cm', name: 'Billy Everyteen' @patient_1 = create :patient, name: 'Susan Everyteen' @patient_2 = create :pati...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/controllers/external_pledges_controller_test.rb
Ruby
mit
92
main
3,159
require 'test_helper' class ExternalPledgesControllerTest < ActionDispatch::IntegrationTest before do @user = create :user sign_in @user @patient = create :patient end describe 'create method' do before do with_versioning(@user) do @pledge = attributes_for :external_pledge ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/controllers/clinicfinders_controller_test.rb
Ruby
mit
92
main
950
require 'test_helper' require 'ostruct' # For tooling related to using the clinicfinder gem class ClinicfindersControllerTest < ActionDispatch::IntegrationTest describe 'search' do before do # Mock service @clinic_struct = OpenStruct.new create(:clinic).attributes @clinic_struct.distance = 300....
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/middleware/rack-attack_spec.rb
Ruby
mit
92
main
5,034
require 'test_helper' class AttackTest < ActionDispatch::IntegrationTest include Rack::Test::Methods def app Rails.application end before do # Prevents ips and emails from conflicting across tests. Rails.cache.clear end describe "throttle excessive requests by IP address" do limit = 60 ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/data_entry_test.rb
Ruby
mit
92
main
8,864
require 'application_system_test_case' # Test data entry mode input class DataEntryTest < ApplicationSystemTestCase before do @line = create :line @user = create :user @clinic = create :clinic create_insurance_config create_referred_by_config log_in_as @user visit data_entry_path has_...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/updating_configs_test.rb
Ruby
mit
92
main
12,754
require 'application_system_test_case' # Confirm behavior around updating fund-editable settings class UpdatingConfigsTest < ApplicationSystemTestCase describe 'non-admin redirect' do [:data_volunteer, :cm].each do |role| it "should deny access as a #{role.to_s}" do user = create :user, role: role ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/activity_log_test.rb
Ruby
mit
92
main
1,874
require 'application_system_test_case' # Confirm that calls and pledges are showing up in activity log class ActivityLogTest < ApplicationSystemTestCase before do @user = create :user @clinic = create :clinic @line = create :line @patient = create :patient, fund_pledge: 100, ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/pledge_fulfillment_test.rb
Ruby
mit
92
main
3,984
require 'application_system_test_case' # Confirm behavior around pledge fulfillment class PledgeFulfillmentTest < ApplicationSystemTestCase before do @user = create :user, role: :cm @admin = create :user, role: :admin @clinic = create :clinic @data_volunteer = create :user, role: :data_volunteer ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/filter_naf_clinics_test.rb
Ruby
mit
92
main
1,630
require 'application_system_test_case' # Confirm that the naf filter checkbox works class FilterNafClinicsTest < ApplicationSystemTestCase before do @user = create :user, role: :cm @naf_clinic = create :clinic, name: 'NAF Accepted', accepts_naf: true @nonnaf_clinic = create :clinic, name: 'No NAF here', ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/note_creation_test.rb
Ruby
mit
92
main
832
require 'application_system_test_case' # Confirm that notes on a patient can be created class NoteCreationTest < ApplicationSystemTestCase before do create :line @user = create :user log_in_as @user @patient = create :patient visit edit_patient_path(@patient) wait_for_element 'Notes' clic...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/select_line_test.rb
Ruby
mit
92
main
1,179
require 'application_system_test_case' # Tests around line selection behavior class SelectLineTest < ApplicationSystemTestCase before do @user = create :user create :line, name: 'DC' create :line, name: 'MD' create :line, name: 'VA' log_in @user end describe 'line selection process' do i...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/display_pledge_info_errors_test.rb
Ruby
mit
92
main
1,535
require 'application_system_test_case' # Test that pledge errors are showing up properly on trying to send a pledge class DisplayPledgeInfoErrorsTest < ApplicationSystemTestCase before do @user = create :user @patient = create :patient @clinic = create :clinic log_in_as @user visit edit_patient_p...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/user_management_test.rb
Ruby
mit
92
main
3,755
require 'application_system_test_case' # Confirm user management functionality class UserManagementTest < ApplicationSystemTestCase before do create :line @user = create :user, name: 'john', email: 'user@dcaf.com', role: :cm @admin = create :user,...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/event_log_interaction_test.rb
Ruby
mit
92
main
2,520
require 'application_system_test_case' class EventLogInteractionTest < ApplicationSystemTestCase before do @user = create :user, role: 'admin', name: 'Billy' @user2 = create :user, role: 'cm', name: 'Susie' @patient = create :patient, name: 'tester', primary_phone: '12312...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/drag_and_drop_test.rb
Ruby
mit
92
main
1,182
# This still works, but for some reason the test is failing. # I think it’s because drag_to takes it to the middle of an element, and for some reason if you move it to the EXACT middle it doesn’t know whether to go up or down, so it goes to neither. # require 'application_system_test_case' # # Test drag and drop call...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/tooltips_test.rb
Ruby
mit
92
main
1,552
require 'application_system_test_case' # Confirm that the tooltip javascript actually pops up like we think it should class TooltipsTest < ApplicationSystemTestCase before do @patient = create :patient @user = create :user log_in_as @user end describe 'an inline tooltip' do # Using call list as ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/call_list_interaction_test.rb
Ruby
mit
92
main
4,224
require 'application_system_test_case' class CallListInteractionTest < ApplicationSystemTestCase include ActiveSupport::Testing::TimeHelpers before do @line = create :line @line2 = create :line @patient = create :patient, name: 'Susan Everyteen', line: @line @patient_2 = create :patient, name: 'Th...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/change_user_roles_test.rb
Ruby
mit
92
main
944
require 'application_system_test_case' # Test that the buttons to change user roles work class ChangeUserRolesTest < ApplicationSystemTestCase before do create :line @user = create :user, role: 'admin', name: 'Billy' @user2 = create :user, role: 'cm', name: 'Susie' log_in_as @user end describe '...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/record_lookup_test.rb
Ruby
mit
92
main
4,301
require 'application_system_test_case' # Confirm functional search and record lookup class RecordLookupTest < ApplicationSystemTestCase before do @line = create :line @line2 = create :line @user = create :user log_in_as @user end describe 'looking up someone who exists', js: true do before d...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/password_reset_test.rb
Ruby
mit
92
main
1,467
require 'application_system_test_case' class PasswordResetTest < ApplicationSystemTestCase before do @user = create :user end describe 'password reset page accessibility' do before do visit root_path end it 'should have a link to the password reset page' do assert has_link? 'Forgot ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/mark_shared_cases_test.rb
Ruby
mit
92
main
672
require 'application_system_test_case' # Mark patients shared and confirm that they show up on the dash after class MarkSharedCasesTest < ApplicationSystemTestCase before do @user = create :user @patient = create :patient log_in_as @user visit edit_patient_path(@patient) click_link 'Notes' end ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/clinic_management_test.rb
Ruby
mit
92
main
4,062
require 'application_system_test_case' # Test workflows around administering lists of clinics a fund works with class ClinicManagementTest < ApplicationSystemTestCase before do create :line @clinic = create :clinic, accepts_naf: true, accepts_medicaid: true @user = create :...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/update_user_info_test.rb
Ruby
mit
92
main
2,383
require 'application_system_test_case' class UpdateUserInfoTest < ApplicationSystemTestCase before do create :line @user = create :user log_in_as @user end describe 'alter user info' do before do visit edit_user_registration_path end it 'should let you change name' do fill_i...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/navbar_links_test.rb
Ruby
mit
92
main
2,560
require 'application_system_test_case' class NavbarLinksTest < ApplicationSystemTestCase before do create :line @user = create :user, role: :admin log_in_as @user end describe 'user dropdown' do before { click_on @user.name } it 'should display the profile link' do assert has_link? t('...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/submit_pledge_test.rb
Ruby
mit
92
main
5,747
require 'application_system_test_case' # Tests around plege submission behavior class SubmitPledgeTest < ApplicationSystemTestCase before do @config = create :pledge_config, fund: ActsAsTenant.current_tenant @user = create :user, role: :data_volunteer @clinic = create :clinic, fax: "202-867-5309" @pa...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/filter_medicaid_clinics_test.rb
Ruby
mit
92
main
1,768
require 'application_system_test_case' # Confirm that the medicaid filter checkbox works class FilterMedicaidClinicsTest < ApplicationSystemTestCase before do @user = create :user, role: :cm @medicaid_clinic = create :clinic, name: 'Medicaid Accepted', accepts_medicaid: true @non_medicaid_clinic = create...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/table_content_test.rb
Ruby
mit
92
main
1,252
require 'application_system_test_case' # Testing around call list table content class TableContentTest < ApplicationSystemTestCase # problematic test before do @user = create :user @patient = create :patient, initial_call_date: 3.days.ago, appointment_date: 3.days.from_now.u...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/voicemail_preference_in_call_modal_test.rb
Ruby
mit
92
main
2,030
require 'application_system_test_case' # Confirm display behavior around whether a patient should receive VMs class VoicemailPreferenceInCallModalTest < ApplicationSystemTestCase extend Minitest::OptionalRetry before do @patient = create :patient, name: 'Susan Everyteen' @user = create :user log_in_as...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/destroying_patients_test.rb
Ruby
mit
92
main
2,222
# require 'application_system_test_case' # class DestroyingPatientsTest < ApplicationSystemTestCase # describe 'destroying a patient' do # before do # @user = create :user, role: :cm # @admin = create :user, role: :admin # @data_volunteer = create :user, role: :data_volunteer # @patient =...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/practical_support_behaviors_test.rb
Ruby
mit
92
main
8,189
require 'application_system_test_case' class PracticalSupportBehaviorsTest < ApplicationSystemTestCase extend Minitest::OptionalRetry before do @line = create :line @user = create :user @patient = create :patient, line: @line create_display_practical_support_attachment_url_config create_displa...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/authorization_test.rb
Ruby
mit
92
main
1,430
require 'application_system_test_case' class AuthorizationTest < ApplicationSystemTestCase before do create :line @user = create :user log_in_as @user end describe 'logging in successfully' do it 'should display a success message after successful login' do refute has_text? 'Signed in succe...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/user_searches_test.rb
Ruby
mit
92
main
1,180
require 'application_system_test_case' # Confirm that user search works like we think it does class UserSearchesTest < ApplicationSystemTestCase before do create :line @user = create :user, role: 'admin', email: 'admin_user@dcabortionfund.org' @user2 = create :user, role: 'cm', ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/mfa_login_test.rb
Ruby
mit
92
main
4,061
require 'application_system_test_case' class MfaLoginTest < ApplicationSystemTestCase PHONE = '5555555555' CORRECT_CODE = '123456' INCORRECT_CODE = '000000' before do @twilio_verify_mock = Minitest::Mock.new create :line @user = create :user end describe 'login' do it 'should successfull...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/clinic_finder_searches_test.rb
Ruby
mit
92
main
1,073
require 'application_system_test_case' # System test for using the clinic finder form. class ClinicFinderSearchesTest < ApplicationSystemTestCase # Commented out because mocking doesn't seem to work in systemtests yet. # before do # @clinic_struct = OpenStruct.new create(:clinic).attributes # @clinic_struc...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/accountant_workflow_test.rb
Ruby
mit
92
main
6,613
require 'application_system_test_case' class AccountantWorkflowTest < ApplicationSystemTestCase extend Minitest::OptionalRetry before do @user = create :user, role: :admin @clinic = create :clinic, name: 'a real clinic' @line = create :line @another_clinic = create :clinic, name: 'alternative clin...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/change_log_test.rb
Ruby
mit
92
main
952
require 'application_system_test_case' # Confirm that changes to patient record show up in the changelog class ChangeLogTest < ApplicationSystemTestCase before do @user = create :user, email: 'first_user@email.com' with_versioning(@user) do @patient = create :patient, name: 'tester', ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/routing_test.rb
Ruby
mit
92
main
793
require 'application_system_test_case' # Confirm that logging in sends you to the sign in path class RoutingTest < ApplicationSystemTestCase before do create :line visit root_path end it 'should have a root with a login form' do assert_equal current_path, new_user_session_path assert_not has_tex...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/create_user_test.rb
Ruby
mit
92
main
2,096
require 'application_system_test_case' # Behavior and permissioning around creating new users class CreateUserTest < ApplicationSystemTestCase extend Minitest::OptionalRetry before { create :line } describe 'nonadmin user' do before { visit root_path } it 'should not let you create a user' do ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/new_patient_creation_test.rb
Ruby
mit
92
main
1,824
require 'application_system_test_case' # Confirm that new patients can be created class NewPatientCreationTest < ApplicationSystemTestCase before do @line1 = create :line @line2 = create :line @line3 = create :line @user = create :user log_in_as @user, @line2 fill_in 'search', with: 'Nobody ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/auth_factor_registration_test.rb
Ruby
mit
92
main
6,007
require 'application_system_test_case' class AuthFactorRegistrationTest < ApplicationSystemTestCase NICKNAME = 'my new factor' PHONE = '5555555555' CORRECT_CODE = '123456' INCORRECT_CODE = '000000' before do @twilio_verify_mock = Minitest::Mock.new create :line log_in_as create(:user) end ...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/account_lockings_test.rb
Ruby
mit
92
main
1,205
require 'application_system_test_case' class AccountLockingsTest < ApplicationSystemTestCase before do create :line @admin = create :user, role: :admin @locked_user = create :user, role: :cm, disabled_by_fund: true @unlocked_user = create :user, role: :cm end describe 'admin locking' do befo...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/create_new_external_pledge_test.rb
Ruby
mit
92
main
676
require 'application_system_test_case' # Test around creating a new external pledge for a fund class CreateNewExternalPledgeTest < ApplicationSystemTestCase before do @user = create :user @patient = create :patient log_in_as @user visit edit_patient_path @patient wait_for_element 'Abortion Inform...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/google_sso_test.rb
Ruby
mit
92
main
770
require 'application_system_test_case' # Test oauth sign in behavior class GoogleSSOTest < ApplicationSystemTestCase describe 'access top page' do before do create :line mock_omniauth end it 'can sign in with Google Auth Account' do @user = create :user, email: 'test@gmail.com' v...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/shared_cases_test.rb
Ruby
mit
92
main
701
require 'application_system_test_case' # Test behavior around shared cases list class SharedCasesTest < ApplicationSystemTestCase before do @patient = create :patient, name: 'Susan Everyteen', shared_flag: true @user = create :user log_in_as @user end describe 'shared cases section' do it 'shoul...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/logging_calls_test.rb
Ruby
mit
92
main
3,075
require 'application_system_test_case' class LoggingCallsTest < ApplicationSystemTestCase extend Minitest::OptionalRetry before do @patient = create :patient, name: 'Susan Everyteen', primary_phone: '123-123-1234' @user = create :user log_in_as @user fill_in 'search...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/system/update_patient_info_test.rb
Ruby
mit
92
main
13,120
require 'application_system_test_case' class UpdatePatientInfoTest < ApplicationSystemTestCase extend Minitest::OptionalRetry before do @line = create :line @line2 = create :line @user = create :user @admin = create :user, role: :admin @clinic = create :clinic @patient = create :patient, l...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/factories/user.rb
Ruby
mit
92
main
247
FactoryBot.define do factory :user do name { 'Billy Everyteen' } sequence :email do |n| "billy#{n}@everyteen.com" end password { 'FCZCidQP4C8GTz' } password_confirmation { 'FCZCidQP4C8GTz' } role { 'cm' } end end
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/factories/clinic.rb
Ruby
mit
92
main
221
FactoryBot.define do factory :clinic do sequence :name do |n| "Friendly Clinic #{n}" end street_address { '123 Fake Street' } city { 'Washington' } state { 'DC' } zip { '20011' } end end
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/factories/pledge_config.rb
Ruby
mit
92
main
325
FactoryBot.define do factory :pledge_config do sequence :contact_email do |n| "contact#{n}@everyteen.com" end sequence :billing_email do |n| "billing#{n}@everyteen.com" end address1 { '123 Fake Street' } address2 { 'Fakeytown, WA 98765' } phone { '281-330-8004' } fund end...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/factories/auth_factor.rb
Ruby
mit
92
main
445
FactoryBot.define do sequence :name do |n| "my phone #{n}" end factory :auth_factor do association :user channel { 'sms' } trait :registration_complete do name { generate :name } phone { '555-555-5555' } registration_complete { true } enabled { true } end trait :...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/factories/fund.rb
Ruby
mit
92
main
355
FactoryBot.define do factory :fund do sequence :name do |n| "Fund #{n}" end sequence :subdomain do |n| "fund#{n}" end domain { 'example.com' } sequence :full_name do |n| "Fund #{n} of Cat Town" end sequence :site_domain do |n| "www.fund#{n}.pizza" end ph...
github
DARIAEngineering/dcaf_case_management
https://github.com/DARIAEngineering/dcaf_case_management
test/factories/practical_support.rb
Ruby
mit
92
main
253
FactoryBot.define do factory :practical_support do patient sequence :source do |n| "Fund #{n}" end sequence :support_type do |n| "Support #{n}" end confirmed { false } support_date { 2.days.from_now } end end
github
inferno-framework/fhir_models
https://github.com/inferno-framework/fhir_models
Rakefile
Ruby
apache-2.0
92
master
512
require 'bundler/gem_tasks' require 'rake/testtask' require 'rspec/core/rake_task' require 'rubocop/rake_task' require 'pry' require 'pry-byebug' Dir['lib/fhir_models/tasks/**/*.rake'].each do |file| load file end desc 'Run basic tests' Rake::TestTask.new(:test) do |t| t.libs << 'test' t.test_files = FileList['...
github
inferno-framework/fhir_models
https://github.com/inferno-framework/fhir_models
Guardfile
Ruby
apache-2.0
92
master
1,663
# A sample Guardfile # More info at https://github.com/guard/guard#readme ## Uncomment and set this to only include directories you want to watch # directories %w(app lib config test spec features) \ # .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")} ## Note: if you are using the `direct...
github
inferno-framework/fhir_models
https://github.com/inferno-framework/fhir_models
fhir_models.gemspec
Ruby
apache-2.0
92
master
1,834
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'fhir_models/version' Gem::Specification.new do |spec| spec.name = 'fhir_models' spec.version = FHIR::Models::VERSION spec.authors = ['Jason Walonoski', 'Andre Quina', "...
github
inferno-framework/fhir_models
https://github.com/inferno-framework/fhir_models
spec/spec_helper.rb
Ruby
apache-2.0
92
master
5,276
require 'bundler/setup' Bundler.setup require 'simplecov' SimpleCov.start do add_filter '/spec/' add_group 'FHIR Models', 'lib/fhir_models/fhir/resources' add_group 'Generator Files', 'lib/fhir_models/bootstrap' end require 'fhir_models' require 'pry' require 'pry-byebug' # This file was generated by the `rspec ...
github
inferno-framework/fhir_models
https://github.com/inferno-framework/fhir_models
spec/lib/fhir_models/fhir_spec.rb
Ruby
apache-2.0
92
master
21,302
RSpec.describe 'FHIR' do describe '#primitive?(datatype: datatype, value: value)' do subject { FHIR } describe "datatype: 'boolean'" do let(:datatype) { 'boolean' } context 'return true when' do let(:result) { true } specify 'value = true' do expect(subject.primitive?(da...
github
inferno-framework/fhir_models
https://github.com/inferno-framework/fhir_models
spec/lib/fhir_models/r4b/definition_spec.rb
Ruby
apache-2.0
92
master
418
require_relative '../../../../lib/fhir_models/r4b/bootstrap/definitions' require_relative '../../../../lib/fhir_models/r4b' RSpec.describe FHIR::R4B::Definitions do describe '#resource_definition' do it 'returns R4B resource definition' do result = FHIR::R4B::Definitions.resource_definition('Patient') ...
github
inferno-framework/fhir_models
https://github.com/inferno-framework/fhir_models
spec/lib/fhir_models/r5/definition_spec.rb
Ruby
apache-2.0
92
master
412
require_relative '../../../../lib/fhir_models/r5/bootstrap/definitions' require_relative '../../../../lib/fhir_models/r5' RSpec.describe FHIR::R5::Definitions do describe '#resource_definition' do it 'returns R5 resource definition' do result = FHIR::R5::Definitions.resource_definition('Patient') expe...
github
inferno-framework/fhir_models
https://github.com/inferno-framework/fhir_models
spec/lib/fhir_models/r4/definition_spec.rb
Ruby
apache-2.0
92
master
2,209
require_relative '../../../../lib/fhir_models/r4/bootstrap/definitions' RSpec.describe FHIR::Definitions do let (:fhir_version) {'4.0.1'} describe 'FHIR Type Definitions' do it 'returns R4 primitive type definition' do name = 'string' result = FHIR::Definitions.type_definition(name) expect(...
github
inferno-framework/fhir_models
https://github.com/inferno-framework/fhir_models
spec/lib/fhir_models/bootstrap/model_spec.rb
Ruby
apache-2.0
92
master
3,032
RSpec.describe 'FHIR::Model' do describe '#hash' do it 'should be the same for two identical fhir models' do attributes = { name: [ family: [ 'Smith' ] ] } patient1 = FHIR::Patient.new(attributes) patient2 = FHIR::Patient.new(attributes) expect(patient1.hash...
github
inferno-framework/fhir_models
https://github.com/inferno-framework/fhir_models
test/test_helper.rb
Ruby
apache-2.0
92
master
1,609
require 'simplecov' SimpleCov.start require 'objspace' require 'nokogiri/diff' require 'test/unit' require 'pry' require 'fhir_models' FHIR.logger.level = Logger::INFO PRIMITIVE_EXTENSIONS = [ 'activitydefinition-administer-zika-virus-exposure-assessment', 'activitydefinition-example', 'activitydefinition-ord...