I like the tests you have .. Can you add this too ->
```ruby
  def test_readable_repositories_with_right_permissions
    setup_current_user_with_permissions(:name => ":view_product",
                                        :search => "name=\"#{Repository.first.product.name}\"")
    assert_equal([Repository.first], Product.readable_repositories([Repository.first.id]))
  end
```