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
Remove dependency on user_type of create :user. #14752
Conversation
ebe752c
to
eefecb6
Compare
refute ability.can?(:destroy, Level) | ||
refute ability.can?(:destroy, Activity) | ||
|
||
assert ability.can?(:read, Section) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copied from "as student", with the can?(:read, Section)
changed from refute
to assert
.
@@ -35,8 +35,8 @@ class AbilityTest < ActiveSupport::TestCase | |||
refute ability.can?(:read, @login_required_script_level) | |||
end | |||
|
|||
test "as member" do | |||
ability = Ability.new(create(:user)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test fails with create(:teacher)
.
@@ -25,7 +25,7 @@ class ApiControllerTest < ActionController::TestCase | |||
# some of our tests depend on sorting of students by name, thus we name them ourselves | |||
@students = [] | |||
5.times do |i| | |||
student = create(:user, name: "student_#{i}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test fails with create(:teacher, name: "student_#{i}")
.
The eyes failures should be unrelated. |
No description provided.