Skip to content

Commit d2ed5f8

Browse files
committed
Ignoring email config and testing catch block
1 parent 837d8fb commit d2ed5f8

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
package edu.tamu.app.config;
22

3+
import org.junit.Ignore;
34
import org.springframework.context.annotation.Configuration;
45
import org.springframework.context.annotation.Profile;
56

67
import edu.tamu.weaver.email.config.WeaverEmailConfig;
78

89
@Configuration
910
@Profile("!test")
11+
@Ignore("Not used in tests")
1012
public class AppEmailConfig extends WeaverEmailConfig {
1113

1214
}

src/test/java/edu/tamu/app/model/IdeaTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ public void testReject() throws UserNotFoundException {
154154
assertEquals("Idea was not rejected", IdeaState.REJECTED, idea.getState());
155155
}
156156

157+
@Test
158+
public void testRejectException() {
159+
Idea idea = new Idea(TEST_IDEA_TITLE, TEST_IDEA_DESCRIPTION, testUser, service1);
160+
ideaRepo.reject(idea);
161+
}
162+
157163
@Test
158164
public void testTimestampSetOnCreate() throws UserNotFoundException {
159165
Idea Idea = ideaRepo.create(testIdea, TEST_CREDENTIALS);

0 commit comments

Comments
 (0)