Hey Sage, I figured out why RandomData wasn't working and it was as I expected. The RandomData file needed to be under app/lib.
I also made the test pass in this commit. The problem was the User does not have a :name attribute, I removed it and the test passed fine.
I also made a test to show that the scoping works for Wikis.
describe "wiki scope works" do
it "filters down wikis" do
# Since the user is not premium they will only be able
# to see the non-private wiki
expect(Wiki.all.visible_to(user).count).to eq(1)
end
end
Hey Sage, I figured out why RandomData wasn't working and it was as I expected. The RandomData file needed to be under
app/lib
.I also made the test pass in this commit. The problem was the User does not have a
:name
attribute, I removed it and the test passed fine.I also made a test to show that the scoping works for Wikis.
Let me know if you have any questions.