spec: fix some spec weirdness
the after hooks are broken (@a2 is nil) and unnecessary (because of transactions). also, these specs fail fairly regularly, seemingly due to userSettings bleeding across specs (same course + user ids, so settings from a previous spec could still apply) Change-Id: I7b2ddfcd5bf4a9cf6a303f42476b164ffec97db2 Reviewed-on: https://gerrit.instructure.com/109095 Tested-by: Jenkins Reviewed-by: Landon Wilkins <lwilkins@instructure.com> Product-Review: Landon Wilkins <lwilkins@instructure.com> QA-Review: Landon Wilkins <lwilkins@instructure.com>
This commit is contained in:
parent
7c13e71169
commit
3ef932cf9a
|
@ -69,10 +69,6 @@ shared_context 'assign outside of weighted grading period' do
|
||||||
|
|
||||||
@a2.update_attributes(due_at: 3.weeks.ago)
|
@a2.update_attributes(due_at: 3.weeks.ago)
|
||||||
end
|
end
|
||||||
|
|
||||||
after(:all) do
|
|
||||||
@a2.update_attributes(due_at: 1.week.from_now)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_context 'assign outside of unweighted grading period' do
|
shared_context 'assign outside of unweighted grading period' do
|
||||||
|
@ -84,10 +80,6 @@ shared_context 'assign outside of unweighted grading period' do
|
||||||
|
|
||||||
@a2.update_attributes(due_at: 3.weeks.ago)
|
@a2.update_attributes(due_at: 3.weeks.ago)
|
||||||
end
|
end
|
||||||
|
|
||||||
after(:all) do
|
|
||||||
@a2.update_attributes(due_at: 1.week.from_now)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_context 'no grading periods or assignment weighting' do
|
shared_context 'no grading periods or assignment weighting' do
|
||||||
|
|
|
@ -25,5 +25,9 @@ describe 'individual view' do
|
||||||
weighted_grading_setup
|
weighted_grading_setup
|
||||||
end
|
end
|
||||||
|
|
||||||
|
after(:each) do
|
||||||
|
clear_local_storage
|
||||||
|
end
|
||||||
|
|
||||||
it_behaves_like 'a gradebook'
|
it_behaves_like 'a gradebook'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue