Test version link href

pull/2313/head
Hagen Schink 10 years ago
parent 4a5c5cc87b
commit 1f49a7c0d8
  1. 6
      spec/lib/api/v3/work_packages/work_package_representer_spec.rb

@ -239,11 +239,15 @@ describe ::API::V3::WorkPackages::WorkPackageRepresenter do
context 'version set' do
let!(:version) { FactoryGirl.create :version, project: project }
let(:expected_url) { "/versions/#{version.id}".to_json }
before do
work_package.fixed_version = version
end
it { is_expected.to have_json_path('_links/version/href') }
it {
is_expected.to be_json_eql(expected_url).at_path('_links/version/href')
}
context ' but is not accessible due to permissions' do
before do

Loading…
Cancel
Save