func (s *workItemRepoBlackBoxTest) TestTypeChangeIsNotProhibitedOnDBLayer() {
	// Create at least 1 item to avoid RowsAffectedCheck
	// given
	wi, err := s.repo.Create(
		s.ctx, s.spaceID, workitem.SystemBug,
		map[string]interface{}{
			workitem.SystemTitle: "Title",
			workitem.SystemState: workitem.SystemStateNew,
		}, s.creatorID)
	require.Nil(s.T(), err)
	// when
	wi.Type = workitem.SystemFeature
	newWi, err := s.repo.Save(s.ctx, s.spaceID, *wi, s.creatorID)
	// then
	require.Nil(s.T(), err)
	assert.True(s.T(), uuid.Equal(workitem.SystemFeature, newWi.Type))
}
// TestTypeChangeIsNotProhibitedOnDBLayer tests that you can change the type of
// a work item. NOTE: This functionality only works on the DB layer and is not
// exposed to REST.
TestTypeChangeIsNotProhibitedOnDBLayer tests that you can change the type of
a work item. NOTE: This functionality only works on the DB layer and is not
exposed to REST.
// TestTypeChangeIsNotProhibitedOnDBLayer tests that you can change the type of // a work item . NOTE : This functionality only works on the DB layer and is not // exposed to REST .
func (s *workItemRepoBlackBoxTest) TestTypeChangeIsNotProhibitedOnDBLayer() {
	wi, err := s.repo.Create(
		s.ctx, s.spaceID, workitem.SystemBug,
		map[string]interface{}{
			workitem.SystemTitle: "Title",
			workitem.SystemState: workitem.SystemStateNew,
		}, s.creatorID)
	require.Nil(s.T(), err)
	wi.Type = workitem.SystemFeature
	newWi, err := s.repo.Save(s.ctx, s.spaceID, *wi, s.creatorID)
	require.Nil(s.T(), err)
	assert.True(s.T(), uuid.Equal(workitem.SystemFeature, newWi.Type))
}
func ( s * workItemRepoBlackBoxTest ) TestTypeChangeIsNotProhibitedOnDBLayer ( ) { wi , err := s . repo . Create ( s . ctx , s . spaceID , workitem . SystemBug , map [ string ] interface { } { workitem . SystemTitle : " " , workitem . SystemState : workitem . SystemStateNew , } , s . creatorID ) require . Nil ( s . T ( ) , err ) wi . Type = workitem . SystemFeature newWi , err := s . repo . Save ( s . ctx , s . spaceID , * wi , s . creatorID ) require . Nil ( s . T ( ) , err ) assert . True ( s . T ( ) , uuid . Equal ( workitem . SystemFeature , newWi . Type ) ) }
TestTypeChangeIsNotProhibitedOnDBLayer tests that you can change the type of
a work item.
TestTypeChangeIsNotProhibitedOnDBLayer tests that you can change the type of a work item .
// Create at least 1 item to avoid RowsAffectedCheck // given // when // then