diff --git a/db/structure.sql b/db/structure.sql index 1dc1d29e..35b6d6dc 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -16,20 +16,6 @@ SET row_security = off; CREATE SCHEMA ctgov; --- --- Name: public; Type: SCHEMA; Schema: -; Owner: - --- - -CREATE SCHEMA public; - - --- --- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: - --- - -COMMENT ON SCHEMA public IS 'standard public schema'; - - -- -- Name: support; Type: SCHEMA; Schema: -; Owner: - -- @@ -4557,7 +4543,7 @@ ALTER TABLE ONLY support.file_records -- PostgreSQL database dump complete -- -SET search_path TO ctgov,support,public; +SET search_path TO ctgov, support, public; INSERT INTO "schema_migrations" (version) VALUES ('20160630191037'), diff --git a/spec/models/utils/util_table_exporter_spec.rb b/spec/models/utils/util_table_exporter_spec.rb index 528973ac..899af4f2 100644 --- a/spec/models/utils/util_table_exporter_spec.rb +++ b/spec/models/utils/util_table_exporter_spec.rb @@ -34,7 +34,19 @@ File.open('public/static/tmp/export/outcomes.txt', 'wb+') do |file| table_exporter.export_table('outcomes', file, '|') end - expect(File.read('public/static/tmp/export/outcomes.txt')).to eq(File.read('spec/support/outcomes.txt')) + result_file = '' + File.open('public/static/tmp/export/outcomes.txt', 'r') do |input_file| + output_lines = '' + # Iterate through each line in the input file and remove the first column + input_file.each_line do |line| + columns = line.chomp.split('|') + columns.shift + modified_line = columns.join('|') + output_lines << modified_line + "\n" + end + result_file = output_lines + end + expect(result_file).to eq(File.read('spec/support/outcomes.txt')) end end diff --git a/spec/support/outcomes.txt b/spec/support/outcomes.txt index 56abc8aa..0b37a2f7 100644 --- a/spec/support/outcomes.txt +++ b/spec/support/outcomes.txt @@ -1,3 +1,3 @@ -id|nct_id|outcome_type|title|description|time_frame|population|anticipated_posting_date|anticipated_posting_month_year|units|units_analyzed|dispersion_type|param_type -1|NCT05594173|Primary|Number of Chewing Cycles Per Bolus|Using surface electromyography (sEMG) of the masseter muscle, we will count the number of muscle contraction spikes (i.e. chewing cycles) seen for chewing activity for a single comfortable bite of each bolus type.|Baseline (single timepoint only)|Data for 3 additional participants could not be analyzed due to poor electromyography signal quality.|||number of chewing cycles||Standard Deviation|Mean -2|NCT05594173|Primary|Total Chewing Duration Per Bolus|Using surface electromyography (sEMG) of the masseter muscle, we will count the total duration of chewing activity for a single comfortable bite of each bolus type.|Baseline (single timepoint only)|Data for 3 additional participants could not be analyzed due to poor EMG signal quality.|||seconds||Standard Deviation|Mean +nct_id|outcome_type|title|description|time_frame|population|anticipated_posting_date|anticipated_posting_month_year|units|units_analyzed|dispersion_type|param_type +NCT05594173|Primary|Number of Chewing Cycles Per Bolus|Using surface electromyography (sEMG) of the masseter muscle, we will count the number of muscle contraction spikes (i.e. chewing cycles) seen for chewing activity for a single comfortable bite of each bolus type.|Baseline (single timepoint only)|Data for 3 additional participants could not be analyzed due to poor electromyography signal quality.|||number of chewing cycles||Standard Deviation|Mean +NCT05594173|Primary|Total Chewing Duration Per Bolus|Using surface electromyography (sEMG) of the masseter muscle, we will count the total duration of chewing activity for a single comfortable bite of each bolus type.|Baseline (single timepoint only)|Data for 3 additional participants could not be analyzed due to poor EMG signal quality.|||seconds||Standard Deviation|Mean