Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Use a videos fixture instead of seeding videos.csv #27788

Merged
merged 2 commits into from
Apr 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion dashboard/lib/tasks/seed.rake
Original file line number Diff line number Diff line change
Expand Up @@ -315,5 +315,5 @@ namespace :seed do
task incremental: [:videos, :concepts, :scripts_incremental, :callouts, :school_districts, :schools, :secret_words, :secret_pictures, :courses, :ap_school_codes, :ap_cs_offerings, :ib_school_codes, :ib_cs_offerings, :state_cs_offerings]

desc "seed only dashboard data required for tests"
task test: [:videos, :games, :concepts, :secret_words, :secret_pictures, :school_districts, :schools]
task test: [:games, :concepts, :secret_words, :secret_pictures, :school_districts, :schools]
end
15 changes: 15 additions & 0 deletions dashboard/test/fixtures/video.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
C1_pair_programming:
id: 326
key: C1_pair_programming
youtube_code: vgkahOzFH2Q
download: http://videos.code.org/2014/C1-pair-programming.mp4
csd_gamelab_draw_2:
id: 137
key: csd_gamelab_draw_2
youtube_code: QLabeWhw_O0
download: https://videos.code.org/levelbuilder/gamelab_addingcolors-mp4.mp4
hoc_wrapup:
id: 13
key: hoc_wrapup
youtube_code: 98Wft30gUQE
download: http://videos.code.org/new/2f-HoC-wrap-up-final.mp4
1 change: 0 additions & 1 deletion lib/rake/test.rake
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ namespace :test do
fixture_hash = Digest::MD5.hexdigest(
Dir["#{fixture_path}/{**,*}/*.yml"].
push(dashboard_dir('db/schema.rb')).
push(dashboard_dir('config/videos.csv')).
select(&File.method(:file?)).
sort.
map(&Digest::MD5.method(:file)).
Expand Down