Skip to content

Commit

Permalink
Merge pull request #27788 from code-dot-org/videos-fixture
Browse files Browse the repository at this point in the history
Tests: Use a videos fixture instead of seeding videos.csv
  • Loading branch information
islemaster committed Apr 1, 2019
2 parents 31e58d6 + 9cc7f02 commit 48e1a36
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
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

0 comments on commit 48e1a36

Please sign in to comment.