summaryrefslogtreecommitdiff
path: root/spec/models/readme_blob_spec.rb
blob: 34182fa413fe5ae7afacc3a3e63e872b830fed38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

require 'spec_helper'

describe ReadmeBlob do
  include FakeBlobHelpers

  describe 'policy' do
    let(:project) { build(:project, :repository) }

    subject { described_class.new(fake_blob(path: 'README.md'), project.repository) }

    it 'works with policy' do
      expect(Ability.allowed?(project.creator, :read_blob, subject)).to be_truthy
    end
  end
end