Skip to content

Commit

Permalink
Fix specs
Browse files Browse the repository at this point in the history
  • Loading branch information
gabina committed Dec 19, 2024
1 parent 61ec133 commit 5771ea9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 0 additions & 3 deletions spec/models/articles_courses_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,6 @@
described_class.update_from_course_revisions(course, array_revisions)
expect(described_class.count).to eq(2)
expect(described_class.first.first_revision).to eq('2024-07-06 20:05:10')
# 62 days from course start up to course end x 2 articles courses
expect(described_class.first.article_course_timeslices.count).to eq(62)
expect(described_class.second.article_course_timeslices.count).to eq(62)
end
end
end
5 changes: 2 additions & 3 deletions spec/services/update_course_wiki_timeslices_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@
article_course = ArticlesCourses.find_by(article_id: article.id)

# Article course timeslice record was created for mw_page_id 6901525
# timeslices from 2018-11-24 to 2018-11-30 were created
expect(article_course.article_course_timeslices.count).to eq(7)
# timeslices for 2018-11-24 was created
expect(article_course.article_course_timeslices.count).to eq(1)
expect(article_course.article_course_timeslices.first.start).to eq('2018-11-24')
expect(article_course.article_course_timeslices.last.start).to eq('2018-11-30')
# Article course timeslices caches were updated
expect(article_course.article_course_timeslices.first.character_sum).to eq(427)
expect(article_course.article_course_timeslices.first.references_count).to eq(-2)
Expand Down

0 comments on commit 5771ea9

Please sign in to comment.