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
benbalter/jekyll-optional-front-matter
https://github.com/benbalter/jekyll-optional-front-matter
lib/jekyll-optional-front-matter/generator.rb
Ruby
mit
89
main
2,617
# frozen_string_literal: true module JekyllOptionalFrontMatter class Generator < Jekyll::Generator attr_accessor :site safe true priority :normal CONFIG_KEY = "optional_front_matter" ENABLED_KEY = "enabled" CLEANUP_KEY = "remove_originals" def initialize(site) @site = site en...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
Gemfile
Ruby
apache-2.0
89
master
3,919
# frozen_string_literal: true source 'https://rubygems.org' ruby '3.4.9' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 8.0.0', '>= 8.0.2.1' gem 'propshaft' gem 'delayed_job_mongoid', '~> 3.0.0' gem 'mongoid', '~> 9.0.0' # gem 'mongoid', '~> 4.0.2' gem 'bson' gem 'mustache' ## g...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
config/routes.rb
Ruby
apache-2.0
89
master
3,727
# frozen_string_literal: true Rails.application.routes.draw do # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html devise_for :users, controllers: { registrations: 'registrations', sessions: 'sessions' } # devise_scope :user do # get '/users', to: redirect('/u...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
config/application.rb
Ruby
apache-2.0
89
master
2,008
# frozen_string_literal: true require_relative 'boot' require 'rails' # Pick the frameworks you want: require 'active_model/railtie' require 'active_job/railtie' # require "active_record/railtie" # require "active_storage/engine" require 'action_controller/railtie' require 'action_mailer/railtie' # require "action_ma...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
config/importmap.rb
Ruby
apache-2.0
89
master
1,060
# frozen_string_literal: true # Pin npm packages by running ./bin/importmap pin 'application', preload: true # Preload core/vendor libs so the browser can fetch them in parallel and avoid waterfall pin 'jquery2-core', to: 'jquery2.min.js', preload: true pin 'jquery2', to: 'jquery2_global.js', preload: true pin '@pop...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
config/environments/production.rb
Ruby
apache-2.0
89
master
3,440
# frozen_string_literal: true require 'active_support/core_ext/integer/time' Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads mos...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
config/environments/development.rb
Ruby
apache-2.0
89
master
2,281
# frozen_string_literal: true require 'active_support/core_ext/integer/time' Rails.application.configure do # Configure 'rails notes' to inspect Cucumber files config.annotations.register_directories('features') config.annotations.register_extensions('feature') { |tag| /#\s*(#{tag}):?\s*(.*)$/ } # Settings s...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
config/environments/test.rb
Ruby
apache-2.0
89
master
2,589
# frozen_string_literal: true require 'active_support/core_ext/integer/time' # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between test r...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
config/initializers/inflections.rb
Ruby
apache-2.0
89
master
687
# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflec...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
config/initializers/new_framework_defaults_7_0.rb
Ruby
apache-2.0
89
master
6,757
# Be sure to restart your server when you modify this file. # # This file eases your Rails 7.0 framework defaults upgrade. # # Uncomment each configuration one by one to switch to the new default. # Once your application is ready to run with all new defaults, you can remove # this file and set the `config.load_defaults...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
config/initializers/mongo.rb
Ruby
apache-2.0
89
master
274
module QME Mongoid.logger.level = Logger::INFO Mongoid.logger = Rails.logger if ENV['MONGO_LOGS'].eql? 'true' Mongo::Logger.logger.level = Logger::WARN Mongo::Logger.logger = Rails.logger if ENV['MONGO_LOGS'].eql? 'true' # BSON::Config.validating_keys = false end
github
projectcypress/cypress
https://github.com/projectcypress/cypress
config/initializers/devise.rb
Ruby
apache-2.0
89
master
8,985
# Use this hook to configure devise mailer, warden hooks and so forth. The first # four configuration values can also be set straight in your models. Devise.setup do |config| # ==> Mailer Configuration # Configure the e-mail address which will be shown in DeviseMailer. config.mailer_sender = 'registration@project...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
config/initializers/mongoid.rb
Ruby
apache-2.0
89
master
331
module BSON class ObjectId def to_json(*args) to_s.to_json end def as_json(*args) to_s.as_json end end end Mongoid.load!('./config/mongoid.yml') # Example for a specific environment Mongoid::Tasks::Database.create_indexes if (Rails.env.production? || Rails.env.development?) && !ENV['DI...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
db/seeds.rb
Ruby
apache-2.0
89
master
374
# frozen_string_literal: true # This file should contain all the record creation needed to seed the database with its default values. # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). # # Examples: # # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) ...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
features/step_definitions/user.rb
Ruby
apache-2.0
89
master
4,067
# frozen_string_literal: true Given(/^the user is signed in$/) do steps %( Given a user has an account ) login_as @user, scope: :user steps %( Given the user is on the sign in page ) end Given(/^the user is on the sign in page$/) do visit '/' end And(/^there are no bundles installed$/) do Bundle.destroy_al...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
features/step_definitions/vendor.rb
Ruby
apache-2.0
89
master
3,407
# frozen_string_literal: true # # # # # # # # # # G I V E N # # # # # # # # # # Given(/^the user has created a vendor$/) do @vendor = FactoryBot.create(:vendor) end Given(/^the user is on the create vendor page$/) do visit new_vendor_path end # # # # # # # # # W H E N # # # # # # # # # When(/^the user ...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
features/step_definitions/admin.rb
Ruby
apache-2.0
89
master
1,326
# frozen_string_literal: true # # # # # # # # # W H E N # # # # # # # # # When(/^the user is an admin$/) do end When(/^the user is not an admin$/) do @user.remove_role :admin end When(/^the user navigates to the admin page$/) do visit '/admin' end When(/^the user navigates to the bundle_downloads page$/) d...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
features/step_definitions/admin_settings.rb
Ruby
apache-2.0
89
master
1,253
# frozen_string_literal: true When(/^the user selects mode "(.*)"$/) do |mode| choose(mode.capitalize) end When(/^the user sets auto approve to "(enable|disable)"$/) do |val| find("#custom_options_auto_approve_#{val}").click end When(/^the user sets ignore roles to "(enable|disable)"$/) do |val| find("#custom_...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
features/step_definitions/bundle.rb
Ruby
apache-2.0
89
master
271
# frozen_string_literal: true When(/^the default bundle has been deprecated$/) do active_bundle = Bundle.default inactive_bundle = FactoryBot.create(:bundle) inactive_bundle.update(active: true) active_bundle.update(active: false) active_bundle.deprecate end
github
projectcypress/cypress
https://github.com/projectcypress/cypress
features/step_definitions/filtering_test.rb
Ruby
apache-2.0
89
master
4,314
# frozen_string_literal: true include ProductsHelper # # # # # # # # # # G I V E N # # # # # # # # # # # A N D # And(/^the user has created a vendor with a product selecting C4 testing$/) do measure_ids = ['BE65090C-EB1F-11E7-8C3F-9A214CF093AE'] bundle_id = Bundle.default._id @vendor = Vendor.create!(...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
features/step_definitions/product.rb
Ruby
apache-2.0
89
master
25,686
# frozen_string_literal: true include ProductsHelper # # # # # # # # # # # # H E L P E R S # # # # # # # # # # # # def build_product bundle = Bundle.default Product.new(name: 'Product 1', measure_ids: ['BE65090C-EB1F-11E7-8C3F-9A214CF093AE'], bundle_id: bundle._id) end # # # # # # # # # # G I V E N # # ...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
features/step_definitions/measure_test.rb
Ruby
apache-2.0
89
master
7,429
# frozen_string_literal: true include TestExecutionsHelper # # # # # # # # # # G I V E N # # # # # # # # # # # A N D # And(/^the user has selected a measure$/) do @measure = Measure.where(hqmf_id: 'BE65090C-EB1F-11E7-8C3F-9A214CF093AE').first end # # # # # # # # # W H E N # # # # # # # # # # Use thi...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
features/step_definitions/checklist_test.rb
Ruby
apache-2.0
89
master
10,090
# frozen_string_literal: true include ProductsHelper # # # # # # # # # # G I V E N # # # # # # # # # # # A N D # And(/^the user has created a vendor with a product selecting C1 testing with one measure$/) do measure_ids = ['BE65090C-EB1F-11E7-8C3F-9A214CF093AE'] @vendor = FactoryBot.create(:vendor) @b...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
features/step_definitions/program_test.rb
Ruby
apache-2.0
89
master
1,696
# frozen_string_literal: true include TestExecutionsHelper # # # # # # # # # W H E N # # # # # # # # # And(/^the user views (.*) program task$/) do |program_name| @program_test = @product.product_tests.cms_program_tests.where(cms_program: program_name).first visit product_program_test_path(@product, @program...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
features/step_definitions/record_list.rb
Ruby
apache-2.0
89
master
393
# frozen_string_literal: true include TestExecutionsHelper # # # # # # # # # # G I V E N # # # # # # # # # # # A N D # And(/^the user views the task records$/) do page.click_link 'View Patients' end # T H E N # Then(/^the user should see calculation results$/) do page.assert_text('Template Name') p...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
features/step_definitions/record.rb
Ruby
apache-2.0
89
master
8,409
# frozen_string_literal: true include RecordsHelper include ApplicationHelper Given(/^a vendor patient has measure_calculations$/) do Bundle.destroy_all @bundle = FactoryBot.create(:executable_bundle) @vendor = Vendor.create!(name: 'test_vendor_name') @patient = FactoryBot.create(:vendor_test_patient, bundleI...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
features/step_definitions/multi_measure_test.rb
Ruby
apache-2.0
89
master
2,696
# frozen_string_literal: true include TestExecutionsHelper # # # # # # # # # W H E N # # # # # # # # # When(/^the user creates a cvu plus product with records$/) do bundle_id = Bundle.default._id measure_ids = %w[BE65090C-EB1F-11E7-8C3F-9A214CF093AE 40280382-5FA6-FE85-0160-0918E74D2075] @product = @vendor....
github
projectcypress/cypress
https://github.com/projectcypress/cypress
features/support/env.rb
Ruby
apache-2.0
89
master
6,017
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril. # It is recommended to regenerate this file in the future when you upgrade to a # newer version of cucumber-rails. Consider adding your own code to a new file # instead of editing this one. Cucumber will automatically load all features/**/*...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
features/support/debugging.rb
Ruby
apache-2.0
89
master
227
# frozen_string_literal: true After do |scenario| if scenario.failed? # When a scenario fails, print the page source and stop running tests. Cucumber.logger.info page.html Cucumber.wants_to_quit = true end end
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/test_helper.rb
Ruby
apache-2.0
89
master
8,099
# frozen_string_literal: true require 'simplecov' SimpleCov.start 'rails' class SimpleCov::Formatter::QualityFormatter def format(result) SimpleCov::Formatter::HTMLFormatter.new.format(result) File.open('coverage/covered_percent', 'w') do |f| f.puts result.source_files.covered_percent.to_f end e...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/vcr_setup.rb
Ruby
apache-2.0
89
master
1,140
# frozen_string_literal: true require 'vcr' require 'webmock/minitest' # VCR records HTTP interactions to cassettes that can be replayed during unit tests # allowing for faster, more predictible web interactions VCR.configure do |c| # This is where the various cassettes will be recorded to c.cassette_library_dir ...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/api_test.rb
Ruby
apache-2.0
89
master
1,096
# frozen_string_literal: true module ApiTest def assert_has_attributes(hash, attr_names, link_names = nil) attr_names.each { |key| assert hash.key?(key), "should have key #{key}" } return unless link_names assert_not_nil hash['links'] assert_equal link_names.sort, hash['links'].map { |l| l['rel'] }....
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/default_provider_test.rb
Ruby
apache-2.0
89
master
548
# frozen_string_literal: true require 'test_helper' class DefaultProviderTest < Minitest::Test def test_default_provider assert Provider.default_provider, 'should have created default provider' end def test_generate_provider assert Provider.generate_provider, 'should have generated a provider' end ...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/product_report_test.rb
Ruby
apache-2.0
89
master
12,788
# frozen_string_literal: true require 'test_helper' class ProductReportTest < ActionController::TestCase include Devise::Test::ControllerHelpers include Cypress::ErrorCollector include ActiveJob::TestHelper setup do @user = FactoryBot.create(:atl_user) @product_test = FactoryBot.create(:cv_product_te...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/html_test.rb
Ruby
apache-2.0
89
master
8,194
# frozen_string_literal: true require 'test_helper' require 'vcr_setup' class HTMLTest < ActiveSupport::TestCase include ActiveJob::TestHelper def setup @measure = Measure.where(hqmf_id: 'BE65090C-EB1F-11E7-8C3F-9A214CF093AE').first bd = 75.years.ago @qdm_patient = QDM::Patient.new(birthDatetime: bd...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/provider_filter_test.rb
Ruby
apache-2.0
89
master
4,459
# frozen_string_literal: true require 'test_helper' require 'fileutils' class ProviderFilterTest < ActiveSupport::TestCase def setup FactoryBot.create(:tin_provider) FactoryBot.create(:npi_provider) FactoryBot.create(:combination_provider) FactoryBot.create(:default_provider) @all_providers = P...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/record_filter_test.rb
Ruby
apache-2.0
89
master
8,932
# frozen_string_literal: true require 'test_helper' require 'fileutils' class RecordFilterTest < ActiveSupport::TestCase def setup FactoryBot.create(:static_bundle) @all_patients = Patient.all end def test_filter_gender selected_gender = %w[M F].sample filters = { 'genders' => [selected_gender]...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/demographics_randomizer_test.rb
Ruby
apache-2.0
89
master
12,028
# frozen_string_literal: true require 'test_helper' require 'fileutils' class DemographicsRandomizerTest < ActiveSupport::TestCase setup do @bundle = FactoryBot.create(:static_bundle) @given_names = ['Xyntash'] @family_name = 'Zygadoo' @original_race_code = 'NA' @original_gender_code = 'M' @...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/patient_zipper_test.rb
Ruby
apache-2.0
89
master
10,202
# frozen_string_literal: true require 'test_helper' require 'fileutils' class PatientZipperTest < ActiveSupport::TestCase setup do pt = FactoryBot.create(:multi_measure_test_static_result) pt.measure_ids = pt.bundle.measures.map(&:hqmf_id) pt.measure_ids << APP_CONSTANTS['result_measures'].first.hqmf_id...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/name_randomizer_test.rb
Ruby
apache-2.0
89
master
1,018
# frozen_string_literal: true require 'test_helper' require 'fileutils' class NameRandomizerTest < ActiveSupport::TestCase setup do @pt = FactoryBot.create(:product_test_static_result) record1 = @pt.patients.first.clone record1.update(givenNames: ['AA'], familyName: 'BB') @prng = Random.new(Random.n...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/create_download_zip_test.rb
Ruby
apache-2.0
89
master
1,721
# frozen_string_literal: true require 'test_helper' require 'fileutils' class CreateDownloadZipTest < ActiveSupport::TestCase test 'Should create appropriate html' do product_2015_c1 = FactoryBot.create(:product_no_c2) product_2015_c2 = FactoryBot.create(:product_static_bundle) [product_2015_c1, produc...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/clinical_randomizer_test.rb
Ruby
apache-2.0
89
master
11,818
# frozen_string_literal: true require 'test_helper' class ClinicalRandomizerTest < ActiveSupport::TestCase setup do @bundle = FactoryBot.create(:static_bundle, measure_period_start: 1_293_840_000, effective_date: 1_325_375_999) @patient = BundlePatient.new(givenNames: ['Foo'], familyName: 'Bar', bundleId: @...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/population_clone_job_test.rb
Ruby
apache-2.0
89
master
13,555
# frozen_string_literal: true require 'test_helper' require 'fileutils' class PopulationCloneJobTest < ActiveSupport::TestCase def setup @pt = FactoryBot.create(:product_test_static_result) @pt.save! end def test_randomization_of_names original_male_first = NAMES_RANDOM['first']['M'] original_f...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/cypress/qrda_post_processor_test.rb
Ruby
apache-2.0
89
master
3,896
# frozen_string_literal: true require 'test_helper' class QrdaPostProcessorTest < ActiveSupport::TestCase def setup @bundle = FactoryBot.create(:executable_bundle) @patient = BundlePatient.new(givenNames: ['Patient'], familyName: 'Test', bundleId: @bundle.id) end def test_keep_matched_data_type_code_co...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/cypress/data_criteria_attribute_builder_test.rb
Ruby
apache-2.0
89
master
2,604
# frozen_string_literal: true require 'test_helper' class DataCriteriaAttributeBuilderTest < ActiveSupport::TestCase test 'should successfully add attributes to data criteria from a union' do measure_package = Rack::Test::UploadedFile.new(Rails.root.join('test', 'fixtures', 'artifacts', 'CMS249v3.zip'), 'applic...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/cypress/cql_bundle_importer_test.rb
Ruby
apache-2.0
89
master
4,398
# frozen_string_literal: true require 'test_helper' class CqlBundleImporterTest < ActiveSupport::TestCase test 'should not import old bundle' do bundle_zip = File.new(File.join('test', 'fixtures', 'bundles', 'minimal_bundle_qdm_5_4.zip')) err = assert_raises(RuntimeError) do Cypress::CqlBundleImporter...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/cypress/highlighting_test.rb
Ruby
apache-2.0
89
master
2,830
# frozen_string_literal: true require 'test_helper' class HighlightingTest < ActionController::TestCase include Devise::Test::ControllerHelpers include ActiveJob::TestHelper def setup @user = FactoryBot.create(:admin_user) @bundle = FactoryBot.create(:executable_bundle) @vendor = Vendor.create!(nam...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/validators/encounter_validator_test.rb
Ruby
apache-2.0
89
master
2,226
# frozen_string_literal: true require 'test_helper' class EncounterValidatorTest < ActiveSupport::TestCase include ::Validators def setup @validator = Validators::EncounterValidator.new file = File.new(Rails.root.join('test', 'fixtures', 'qrda', 'cat_I', 'good_cat1_single_encounter.xml')).read @docume...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/validators/tin_validator_test.rb
Ruby
apache-2.0
89
master
2,025
# frozen_string_literal: true require 'test_helper' class TinValidatorTest < ActiveSupport::TestCase include ::Validators def setup @validator = Validators::TinValidator.new @options = { task: FactoryBot.create(:task) } APP_CONSTANTS['aco_measures_hqmf_set_ids'] = ['7B2A9277-43DA-4D99-9BEE-6AC271A0774...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/validators/ehr_certification_id_validator_test.rb
Ruby
apache-2.0
89
master
1,580
# frozen_string_literal: true require 'test_helper' class EhrCertificationIdValidatorTest < ActiveSupport::TestCase include ::Validators def setup @validator = Validators::EhrCertificationIdValidator.new @options = { task: FactoryBot.create(:task) } end def test_document_with_properly_formatted_cms_i...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/validators/qrda_cat1_validator_test.rb
Ruby
apache-2.0
89
master
13,195
# frozen_string_literal: true require 'test_helper' class QrdaCat1ValidatorTest < ActiveSupport::TestCase include ::Validators def setup @bundle = FactoryBot.create(:static_bundle) @measures = [Measure.where(hqmf_id: 'BE65090C-EB1F-11E7-8C3F-9A214CF093AE').first] @validator_with_c3 = QrdaCat1Validator...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/validators/cat3_population_validator_test.rb
Ruby
apache-2.0
89
master
2,672
# frozen_string_literal: true require 'test_helper' class Cat3PopulationValidatorTest < ActiveSupport::TestCase include ::Validators def setup @product_test = FactoryBot.create(:product_test_static_result) @task = C2Task.new @task.product_test = @product_test @test_execution = FactoryBot.build(:te...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/validators/expected_results_validator_test.rb
Ruby
apache-2.0
89
master
7,734
# frozen_string_literal: true require 'test_helper' class ExpectedResultsValidatorTest < ActiveSupport::TestCase include ::Validators def setup @product_test = FactoryBot.create(:product_test_static_result) @validator = ExpectedResultsValidator.new(@product_test.expected_results, @product_test.bundle.rand...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/validators/program_validator_test.rb
Ruby
apache-2.0
89
master
1,315
# frozen_string_literal: true require 'test_helper' class ProgramValidatorTest < ActiveSupport::TestCase include ::Validators def setup @validator = Validators::ProgramValidator.new(['HQR_PI']) file = File.new(Rails.root.join('test', 'fixtures', 'qrda', 'cat_I', 'sample_patient_good.xml')).read @docum...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/validators/calculating_augmented_records_test.rb
Ruby
apache-2.0
89
master
1,233
# frozen_string_literal: true require 'test_helper' class CalculatingAugmentedRecordsTest < ActiveSupport::TestCase include ::Validators def setup @product_test = FactoryBot.create(:cv_product_test_static_result) @validator = ::Validators::CalculatingAugmentedRecords.new(@product_test.measures, [], @produ...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/validators/measure_period_validator_test.rb
Ruby
apache-2.0
89
master
5,304
# frozen_string_literal: true require 'test_helper' class MeasurePeriodValidatorTest < ActiveSupport::TestCase include ::Validators def setup @validator = MeasurePeriodValidator.new @vendor_user = FactoryBot.create(:vendor_user) @vendor = FactoryBot.create(:vendor) @bundle = FactoryBot.create(:sta...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/validators/checklist_criteria_validator_test.rb
Ruby
apache-2.0
89
master
9,581
# frozen_string_literal: true require 'test_helper' class ChecklistCriteriaValidator < ActiveSupport::TestCase include ::Validators def setup product = FactoryBot.create(:product_static_bundle) @measure = Measure.where(hqmf_id: 'BE65090C-EB1F-11E7-8C3F-9A214CF093AE').first @checklist_test = product.pr...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/unit/lib/validators/qrda_cat3_validator_test.rb
Ruby
apache-2.0
89
master
782
# frozen_string_literal: true require 'test_helper' class QrdaCat3ValidatorTest < ActiveSupport::TestCase include ::Validators def setup @product_test = FactoryBot.create(:product_test_static_result) @validator_with_c3 = QrdaCat3Validator.new(@product_test.expected_results, true, true, true, @product_tes...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/jobs/filter_test_setup_job_test.rb
Ruby
apache-2.0
89
master
911
# frozen_string_literal: true require 'test_helper' class FilterTestSetupJobTest < ActiveJob::TestCase def setup vendor = FactoryBot.create(:vendor) @bundle = FactoryBot.create(:static_bundle) @product = vendor.products.create(name: 'test_product', c4_test: true, randomize_patients: true, bundle_id: @bu...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/jobs/job_tracker.rb
Ruby
apache-2.0
89
master
1,439
# frozen_string_literal: true require 'test_helper' class JobStatusTest < ActiveJob::TestCase class FailedJob < ApplicationJob include Job::Status def perform raise 'Failed' end end class PassingJob < ApplicationJob include Job::Status def perform; end end test 'should be able to...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/jobs/measure_evaluation_job_test.rb
Ruby
apache-2.0
89
master
2,012
# frozen_string_literal: true require 'test_helper' class MeasureEvaluationJobTest < ActiveJob::TestCase def setup vendor = FactoryBot.create(:vendor) @bundle = FactoryBot.create(:static_bundle) @product = vendor.products.create(name: 'test_product', c2_test: true, randomize_patients: true, bundle_id: @...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/jobs/product_test_setup_job_test.rb
Ruby
apache-2.0
89
master
720
# frozen_string_literal: true require 'test_helper' class ProductTestSetupJobTest < ActiveJob::TestCase def setup vendor = FactoryBot.create(:vendor) @bundle = FactoryBot.create(:static_bundle) @product = vendor.products.build(name: 'test_product', c2_test: true, randomize_patients: true, bundle_id: @bu...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/jobs/test_execution_job_test.rb
Ruby
apache-2.0
89
master
1,630
# frozen_string_literal: true require 'test_helper' class TestExecutionJobTest < ActiveJob::TestCase def setup @ptest = FactoryBot.create(:product_test_static_result) end def test_can_queue_job assert_enqueued_jobs 2 # ptest = ProductTest.find('51703a4e3054cf8439000004') task = @ptest.tasks.cr...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/jobs/mpl_download_create_job_test.rb
Ruby
apache-2.0
89
master
1,498
# frozen_string_literal: true require 'test_helper' class MplDownloadCreateJobTest < ActiveJob::TestCase setup do @bundle = FactoryBot.build(:static_bundle) # Clean up MPL before and after running for consistency FileUtils.rm_rf(@bundle.mpl_path) end teardown do FileUtils.rm_rf(@bundle.mpl_path...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/jobs/single_measure_calculation_job_test.rb
Ruby
apache-2.0
89
master
1,705
# frozen_string_literal: true require 'test_helper' class SingleMeasureCalculationJobTest < ActiveJob::TestCase def setup @bundle = FactoryBot.create(:executable_bundle) @patient = BundlePatient.create(givenNames: ['Patient'], familyName: 'Test', bundleId: @bundle.id) @patient.qdmPatient.birthDatetime =...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/controllers/home_controller_test.rb
Ruby
apache-2.0
89
master
526
# frozen_string_literal: true require 'test_helper' class HomeControllerTest < ActionController::TestCase test 'should get index without logged in user' do get :index assert_response :redirect assert_redirected_to controller: 'sessions', action: 'new' end test 'should get index with logged in user' ...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/controllers/tasks_controller_test.rb
Ruby
apache-2.0
89
master
5,161
# frozen_string_literal: true require 'test_helper' require 'api_test' class TasksControllerTest < ActionController::TestCase include ApiTest setup do FactoryBot.create(:admin_user) FactoryBot.create(:atl_user) FactoryBot.create(:user_user) vendor_user = FactoryBot.create(:vendor_user) Factor...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/controllers/checklist_tests_controller_test.rb
Ruby
apache-2.0
89
master
2,724
# frozen_string_literal: true require 'test_helper' class ChecklistTestsControllerTest < ActionController::TestCase include ActiveJob::TestHelper setup do FactoryBot.create(:admin_user) FactoryBot.create(:user_user) vendor_user = FactoryBot.create(:vendor_user) FactoryBot.create(:other_user) @...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/controllers/version_controller_test.rb
Ruby
apache-2.0
89
master
849
# frozen_string_literal: true require 'test_helper' class VersionControllerTest < ActionController::TestCase include ActiveJob::TestHelper setup do FactoryBot.create(:admin_user) @version = { 'version' => Cypress::Application::VERSION } end # # # # # # # # A P I # # # # # # # # test 'should...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/controllers/qrda_uploads_controller_test.rb
Ruby
apache-2.0
89
master
4,336
# frozen_string_literal: true require 'test_helper' class QrdaUploadsControllerTest < ActionController::TestCase include ActiveJob::TestHelper include VersionConfigHelper setup do FactoryBot.create(:admin_user) FactoryBot.create(:atl_user) FactoryBot.create(:user_user) FactoryBot.create(:other_u...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/controllers/products_controller_test.rb
Ruby
apache-2.0
89
master
23,338
# frozen_string_literal: true require 'test_helper' require 'api_test' class ProductsControllerTest < ActionController::TestCase include Devise::Test::ControllerHelpers include ActiveJob::TestHelper include ApiTest setup do FactoryBot.create(:admin_user) FactoryBot.create(:atl_user) FactoryBot.cr...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/controllers/vendors_controller_test.rb
Ruby
apache-2.0
89
master
10,151
# frozen_string_literal: true require 'test_helper' require 'api_test' class VendorsControllerTest < ActionController::TestCase include ApiTest setup do @vendor = FactoryBot.create(:vendor_with_points_of_contact) FactoryBot.create(:admin_user) FactoryBot.create(:atl_user) FactoryBot.create(:user_...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/controllers/test_executions_controller_test.rb
Ruby
apache-2.0
89
master
27,559
# frozen_string_literal: true require 'test_helper' require 'api_test' class TestExecutionsControllerTest < ActionController::TestCase include Devise::Test::ControllerHelpers include ActiveJob::TestHelper include ApiTest include TestExecutionsHelper setup do FactoryBot.create(:admin_user) FactoryBo...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/controllers/vendor_records_controller_test.rb
Ruby
apache-2.0
89
master
13,918
# frozen_string_literal: true require 'test_helper' class VendorsRecordsControllerTest < ActionController::TestCase tests Vendors::RecordsController include ActiveJob::TestHelper setup do FactoryBot.create(:admin_user) FactoryBot.create(:atl_user) FactoryBot.create(:user_user) FactoryBot.create(...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/controllers/admin_controller_test.rb
Ruby
apache-2.0
89
master
661
# frozen_string_literal: true require 'test_helper' class AdminControllerTest < ActionController::TestCase setup do FactoryBot.create(:admin_user) end test 'should get show' do Rails.application.config.action_mailer.smtp_settings = { address: Settings.current.mailer_address, port: Settings....
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/controllers/bundles_controller_test.rb
Ruby
apache-2.0
89
master
1,882
# frozen_string_literal: true require 'test_helper' class BundlesControllerTest < ActionController::TestCase include ActiveJob::TestHelper setup do FactoryBot.create(:admin_user) FactoryBot.create(:user_user) FactoryBot.create(:vendor_user) FactoryBot.create(:other_user) @user = FactoryBot.crea...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/controllers/records_controller_test.rb
Ruby
apache-2.0
89
master
2,550
# frozen_string_literal: true require 'test_helper' class RecordsControllerTest < ActionController::TestCase include Devise::Test::ControllerHelpers setup do FactoryBot.create(:admin_user) FactoryBot.create(:atl_user) FactoryBot.create(:user_user) vendor_user = FactoryBot.create(:vendor_user) ...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/controllers/measures_controller_test.rb
Ruby
apache-2.0
89
master
1,116
# frozen_string_literal: true require 'test_helper' class MeasuresControllerTest < ActionController::TestCase include Devise::Test::ControllerHelpers setup do FactoryBot.create(:static_bundle) FactoryBot.create(:atl_user) sign_in User.find('4def93dd4f85cf8968000001') end # json test 'should ge...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/controllers/product_tests_controller_test.rb
Ruby
apache-2.0
89
master
6,997
# frozen_string_literal: true require 'test_helper' require 'api_test' class ProductTestsControllerTest < ActionController::TestCase include Devise::Test::ControllerHelpers include ActiveJob::TestHelper include ApiTest setup do FactoryBot.create(:admin_user) FactoryBot.create(:atl_user) FactoryBo...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/controllers/admin/bundles_controller_test.rb
Ruby
apache-2.0
89
master
8,677
# frozen_string_literal: true require 'test_helper' module Admin class BundlesControllerTest < ActionController::TestCase include ActiveJob::TestHelper setup do FactoryBot.create(:admin_user) FactoryBot.create(:user_user) FactoryBot.create(:vendor_user) FactoryBot.create(:other_user)...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/controllers/admin/users_controller_test.rb
Ruby
apache-2.0
89
master
4,327
# frozen_string_literal: true require 'test_helper' module Admin class UsersControllerTest < ActionController::TestCase include Devise::Test::ControllerHelpers def setup FactoryBot.create(:admin_user) FactoryBot.create(:user_user) FactoryBot.create(:vendor_user) FactoryBot.create(:ot...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/controllers/admin/settings_controller_test.rb
Ruby
apache-2.0
89
master
3,532
# frozen_string_literal: true require 'test_helper' module Admin class SettingsControllerTest < ActionController::TestCase setup do FactoryBot.create(:admin_user) @controller = Admin::SettingsController.new end test 'should successfully update settings' do for_each_logged_in_user([ADM...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/controllers/admin/trackers_controller_test.rb
Ruby
apache-2.0
89
master
823
# frozen_string_literal: true require 'test_helper' module Admin class TrackersControllerTest < ActionController::TestCase setup do FactoryBot.create(:admin_user) @controller = Admin::TrackersController.new @vendor = FactoryBot.create(:vendor_with_points_of_contact) end test 'should s...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/models/individual_result_test.rb
Ruby
apache-2.0
89
master
12,467
# frozen_string_literal: true require 'test_helper' class IndividualResultTest < ActiveSupport::TestCase setup do @bundle = FactoryBot.create(:static_bundle) @measure = @bundle.measures.first @patient = @bundle.patients.first end def test_individual_result_relevant_to_measure_true_statement_result ...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/models/artifact_test.rb
Ruby
apache-2.0
89
master
6,470
# frozen_string_literal: false require 'test_helper' class ArtifactTest < ActiveSupport::TestCase def setup @user = User.create(email: 'vendor@test.com', password: 'TestTest!', password_confirmation: 'TestTest!', terms_and_conditions: '1') @test = FactoryBot.create(:cv_product_test_static_result) @test.p...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/models/c3_cat1_task_test.rb
Ruby
apache-2.0
89
master
1,831
# frozen_string_literal: true require 'test_helper' class C3Cat1TaskTest < ActiveSupport::TestCase include ::Validators include ActiveJob::TestHelper def setup @user = User.create(email: 'vendor@test.com', password: 'TestTest!', password_confirmation: 'TestTest!', terms_and_conditions: '1') @test = Fact...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/models/checklist_test_test.rb
Ruby
apache-2.0
89
master
10,754
# frozen_string_literal: true require 'test_helper' class ChecklistTestTest < ActiveJob::TestCase def setup @product = FactoryBot.create(:product_static_bundle) @test = @product.product_tests.create!({ name: 'c1 visual', measure_ids: ['BE65090C-EB1F-11E7-8C3F-9A214CF093AE'] }, ChecklistTest) end def te...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/models/cms_program_task_test.rb
Ruby
apache-2.0
89
master
16,307
# frozen_string_literal: true require 'test_helper' class CMSProgramTaskTest < ActiveSupport::TestCase include ::Validators include ActiveJob::TestHelper def setup @user = User.create(email: 'vendor@test.com', password: 'TestTest!', password_confirmation: 'TestTest!', terms_and_conditions: '1') @vendor ...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/models/c3_cat3_task_test.rb
Ruby
apache-2.0
89
master
2,864
# frozen_string_literal: true require 'test_helper' class C3Cat3TaskTest < ActiveSupport::TestCase include ::Validators include ActiveJob::TestHelper def setup @user = User.create(email: 'vendor@test.com', password: 'TestTest!', password_confirmation: 'TestTest!', terms_and_conditions: '1') @test = Fact...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/models/product_test.rb
Ruby
apache-2.0
89
master
20,758
# frozen_string_literal: true require 'test_helper' require 'helpers/caching_test' class ProducTest < ActiveSupport::TestCase include ActiveJob::TestHelper def setup @bundle = FactoryBot.create(:static_bundle) @vendor = FactoryBot.create(:vendor) @vendor_user = FactoryBot.create(:vendor_user) Act...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/models/cat3_filter_task_test.rb
Ruby
apache-2.0
89
master
983
# frozen_string_literal: true require 'test_helper' class Cat3FilterTaskTest < ActiveSupport::TestCase include ::Validators include ActiveJob::TestHelper def setup @product_test = FactoryBot.create(:static_filter_test) end def test_create assert @product_test.tasks.create({}, Cat3FilterTask) end...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/models/c1_task_test.rb
Ruby
apache-2.0
89
master
9,639
# frozen_string_literal: true require 'test_helper' class C1TaskTest < ActiveSupport::TestCase include ::Validators include ActiveJob::TestHelper def setup @user = User.create(email: 'vendor@test.com', password: 'TestTest!', password_confirmation: 'TestTest!', terms_and_conditions: '1') @product_test = ...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/models/multi_measure_test_test.rb
Ruby
apache-2.0
89
master
2,770
# frozen_string_literal: true require 'test_helper' class MultiMeasureTestTest < ActiveJob::TestCase def setup @vendor = FactoryBot.create(:vendor) @bundle = FactoryBot.create(:static_bundle) end def setup_extra_measures cloned_cv = Measure.where(hqmf_id: 'BE65090C-EB1F-11E7-8C3F-9A214CF093AE').firs...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/models/product_test_test.rb
Ruby
apache-2.0
89
master
8,615
# frozen_string_literal: true require 'test_helper' class ProductTestTest < ActiveJob::TestCase def setup @vendor_user = FactoryBot.create(:vendor_user) @vendor = FactoryBot.create(:vendor) @bundle = FactoryBot.create(:static_bundle) @product = @vendor.products.create(name: 'test_product', c2_test: ...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/models/c2_task_test.rb
Ruby
apache-2.0
89
master
5,144
# frozen_string_literal: true require 'test_helper' class C2TaskTest < ActiveSupport::TestCase include ::Validators include ActiveJob::TestHelper def setup @user = User.create(email: 'vendor@test.com', password: 'TestTest!', password_confirmation: 'TestTest!', terms_and_conditions: '1') @product_test =...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/models/measure_test_test.rb
Ruby
apache-2.0
89
master
13,450
# frozen_string_literal: true require 'test_helper' class MeasureTestTest < ActiveJob::TestCase def setup @vendor = FactoryBot.create(:vendor) @bundle = FactoryBot.create(:static_bundle) @product = @vendor.products.create(name: 'test_product', measure_ids: ['BE65090C-EB1F-11E7-8C3F-9A214CF093AE'], bundle...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/models/c3_checklist_task_test.rb
Ruby
apache-2.0
89
master
834
# frozen_string_literal: true require 'test_helper' class C3ChecklistTaskTest < ActiveSupport::TestCase include ::Validators include ActiveJob::TestHelper def setup product = FactoryBot.create(:product_static_bundle) product.c3_test = true product.save @checklist_test = product.product_tests.bu...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/models/user_test.rb
Ruby
apache-2.0
89
master
1,834
# frozen_string_literal: true require 'test_helper' class UserTest < ActiveSupport::TestCase def test_user_can_be_associated_with_poc Settings.current.update(auto_associate_pocs: true) Vendor.destroy_all v = Vendor.new(name: 'test_vendor_name') p = PointOfContact.new(name: 'test_poc_name', email: 'v...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/models/cat1_filter_task_test.rb
Ruby
apache-2.0
89
master
868
# frozen_string_literal: true require 'test_helper' class Cat1FilterTaskTest < ActiveSupport::TestCase include ::Validators include ActiveJob::TestHelper def setup @product_test = FactoryBot.create(:static_filter_test) end def test_create assert @product_test.tasks.create({}, Cat1FilterTask) end...
github
projectcypress/cypress
https://github.com/projectcypress/cypress
test/models/filtering_test_test.rb
Ruby
apache-2.0
89
master
4,902
# frozen_string_literal: true require 'test_helper' class FilteringTestTest < ActiveJob::TestCase def setup @product = FactoryBot.create(:product_static_bundle) end def test_create assert_enqueued_jobs 1 options = { 'filters' => {} } ft = @product.product_tests.build({ name: 'test_for_measure_1...