Commit 5c69043e authored by tiagonbotelho's avatar tiagonbotelho

fixes commit_file test on repository_spec

parent 85e50301
...@@ -130,17 +130,17 @@ describe Repository, models: true do ...@@ -130,17 +130,17 @@ describe Repository, models: true do
end end
end end
describe :create_file do describe :commit_file do
it 'commits change to a file successfully' do it 'commits change to a file successfully' do
expect do expect do
repository.commit_file(user, 'LICENSE', 'Copyright!', repository.commit_file(user, 'CHANGELOG', 'Changelog!',
'Updates filename', 'Updates file content',
'master', true) 'master', true)
end.to change { repository.commits('master').count }.by(1) end.to change { repository.commits('master').count }.by(1)
blob = Blob.decorate(repository.blob_at(repository.commits('master').first.id, 'LICENSE')) blob = repository.blob_at('master', 'CHANGELOG')
expect(blob.data).to eq('Copyright!') expect(blob.data).to eq('Changelog!')
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment