SageBeard / blockipedia

0 stars 1 forks source link

8 private #10

Closed bdougie closed 4 years ago

bdougie commented 7 years ago

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

Let me know if you have any questions.